dbremner / rubydotnetcompiler

Automatically exported from code.google.com/p/rubydotnetcompiler
0 stars 0 forks source link

to_s returning incorrect result for anonymous classes #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
## Adapted from IronRuby tests (Runtime\Class\test_self.rb)

class Foo
end

x = Foo.new

class << x
    puts self.to_s.include?("Foo")
end

Expected output:
true

Actual output:
false

The string returned by to_s on an anonymous class should include the class
of the object associated with the anonymous class (e.g.
"#<Class:#<Foo:0x27b6e18>>" in the above case). This is an IronRuby test
that is failing...

Original issue reported on code.google.com by meaningi...@gmail.com on 2 Oct 2007 at 9:31