[MacRuby-devel] [macruby] #61: ObjectSpace.each_object(Foo) doesn't yield subclasses

macruby ruby-noreply at macosforge.org
Sun May 25 18:20:33 PDT 2008


#61: ObjectSpace.each_object(Foo) doesn't yield subclasses
-------------------------------+--------------------------------------------
 Reporter:  kreatix at gmail.com  |        Owner:  lsansonetti at apple.com
     Type:  defect             |       Status:  closed               
 Priority:  blocker            |    Milestone:  MacRuby 0.2          
Component:  MacRuby            |   Resolution:  fixed                
 Keywords:                     |  
-------------------------------+--------------------------------------------
Changes (by lsansonetti at apple.com):

  * status:  new => closed
  * resolution:  => fixed
  * milestone:  => MacRuby 0.2

Comment:

 Our implementation of ObjectSpace.each_object yields subclasses, except in
 one very special case, when the parameter is Class or Module. This is
 fixed in r218.

 {{{
 $ ./miniruby -e "p ObjectSpace.each_object(Class).map { |x| x.class
 }.uniq"
 [Class]
 $ ./miniruby -e "p ObjectSpace.each_object(Module).map { |x| x.class
 }.uniq"
 [Class, Module]
 }}}

-- 
Ticket URL: <http://ruby.macosforge.org/trac/ticket/61#comment:1>
macruby <http://ruby.macosforge.org/>


More information about the MacRuby-devel mailing list