Hey,

The next REPL session works fine in MRI but in IR it throws an error:
>>> str = "sss"
=> "sss"
>>> ObjectSpace.each_object(String) { |x| puts x }
d:\IronRuby\GitRepository2\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\ObjectSpace.cs:37:in
`each_object': each_object only supported for objects of type Class or
Module (RuntimeError)
        from :0

I looked a bit into it and IR identifies String as a descendant of
Object and not Module as it expects. This problem makes it impossible
to run each_object on Numeric as well (and I guess more types that are
mapped directly to CLR types).

Should I create a bug?

Thanks!
Shay.
-- 
--------------------------------------------------
Shay Friedman
Author of IronRuby Unleashed
http://www.IronShay.com
Follow me: http://twitter.com/ironshay
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to