berkesokhan / rubydotnetcompiler

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

Class variable ||= in extending module #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Test case:

  module M
    def m
      @@v ||= 1
    end
  end

  class C
    extend M
    m
  end

Expected:

  (nothing)

Actual:

  Unhandled Exception: Ruby.Runtime.RubyException: uninitialized class 
variable @@v in M
     at Ruby.Compiler.AST.SOURCEFILE.ExecuteMain(Assembly Assembly, String
[] args) in C:\ruby.net\src\RubyRuntime\Compiler\AST\SourceFile.cs:line 454
     at Ruby.Compiler.AST.SOURCEFILE.ExecuteMain(PEFile Assembly, String[] 
args) in C:\ruby.net\src\RubyRuntime\Compiler\AST\SourceFile.cs:line 432
     at Ruby.Compiler.RubyEntry.Process(String[] args) in 
C:\ruby.net\src\RubyRuntime\Compiler\Ruby.cs:line 46
     at RubyMain.Main(String[] args) in C:\ruby.net\src\Ruby\Main.cs:line 6

Breaks Active Record.

Original issue reported on code.google.com by sason...@gmail.com on 25 Oct 2007 at 6:32

GoogleCodeExporter commented 9 years ago

Original comment by meaningi...@gmail.com on 30 Oct 2007 at 1:51