berkesokhan / rubydotnetcompiler

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

Can't set class variable in anonymous class #35

Closed GoogleCodeExporter closed 9 years ago

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

class C
end

c = C.new

class << c
    @@foo = 1
end

Expected output:
(nothing)

Actual output:
Unhandled Exception: System.InvalidCastException: Unable to cast object of type
'C' to type 'Ruby.Class'.
   at Ruby.Compiler.AST.SOURCEFILE.ExecuteMain(Assembly Assembly, String[]
args)
   at Ruby.Compiler.AST.SOURCEFILE.ExecuteMain(PEFile Assembly, String[] args)
   at Ruby.Compiler.RubyEntry.Process(String[] args)
   at RubyMain.Main(String[] args) in C:\brian\google\src\Ruby\Main.cs:line 5

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

GoogleCodeExporter commented 9 years ago

Original comment by meaningi...@gmail.com on 23 Oct 2007 at 1:18