#297: ObjectSpace.each_object returns Class and Module objects when it shouldn't
--------------------------------+-------------------------------------------
Reporter: n...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: minor | Milestone: MacRuby 0.5
Component: MacRuby | Keywords:
--------------------------------+-------------------------------------------
each_object(someclass) returns objects that are not subclasses of the
requested class.
{{{
ObjectSpace.each_object(String).reject { |o| o.class.ancestors.include?
String }.map { |o| o.class }.uniq
=> [Class, Module, NSString]
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/297>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel