[MacRuby-devel] [MacRuby] #563: Retrieving the singleton class of a class seems to return Class.

MacRuby ruby-noreply at macosforge.org
Sun Jan 31 07:32:42 PST 2010


#563: Retrieving the singleton class of a class seems to return Class.
-------------------------------------+--------------------------------------
 Reporter:  eloy.de.enige@…          |       Owner:  lsansonetti@…        
     Type:  defect                   |      Status:  new                  
 Priority:  blocker                  |   Milestone:                       
Component:  MacRuby                  |    Keywords:  mocha                
-------------------------------------+--------------------------------------

Comment(by pthomson@…):

 I think the problem here is just in the #inspect method for singleton
 classes.
 The object_id's of A's singleton class and A's class are different:

 {{{
 irb(main):008:0> A.singleton_class.object_id
 => 8592372416
 irb(main):009:0> A.class.object_id
 => 8590007040
 irb(main):010:0> A.class == Class
 => true
 irb(main):011:0> A.singleton_class == Class
 => false
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/563#comment:1>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list