dbremner / rubydotnetcompiler

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

Yielding super in a module -> NoMethodError #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Test case:

  class Foo
    def inspect
      Bar.bar { super }
    end
  end

  module Bar
    def self.bar
      yield
    end
  end

  puts Foo.new.inspect

Expected:

  #<Foo:0x27c6fe8>

Actual:

  Unhandled Exception: Ruby.Runtime.RubyException: super: no superclass 
method `inspect'
     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

Original issue reported on code.google.com by sason...@gmail.com on 18 Oct 2007 at 10:07

GoogleCodeExporter commented 8 years ago

Original comment by meaningi...@gmail.com on 22 Oct 2007 at 7:16