dbremner / rubydotnetcompiler

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

Recursive loading + class inheritance causes PERWAPI.DescriptorException #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Create files a.rb and b.rb, add this code to a.rb:

  # a.rb
  require 'b'
  class Cls
  end
  class Cls2 < Cls
  end

and this to b.rb:

  # b.rb
  require 'a'

Running a.rb causes PERWAPI.DescriptorException.

  Unhandled Exception: PERWAPI.DescriptorException: Descriptor is a Def 
when a Ref is required
     at Ruby.Compiler.AST.SOURCEFILE.ExecuteMain(Assembly Assembly, String
[] args) in C:\ruby.net\src\RubyRuntime\Compiler\AST\SourceFile.cs:line 435
     at Ruby.Compiler.AST.SOURCEFILE.ExecuteMain(PEFile Assembly, String[] 
args) in C:\ruby.net\src\RubyRuntime\Compiler\AST\SourceFile.cs:line 413
     at Ruby.Compiler.RubyEntry.Process(String[] args) in 
C:\ruby.net\src\RubyRuntime\Compiler\Ruby.cs:line 43
     at RubyMain.Main(String[] args) in C:\ruby.net\src\Ruby\Main.cs:line 5

The exception is raised from PERWAPI.CILInstructions.MethInst().  I've 
seen another similar error raised from FieldInst() but I don't know if 
they're related.

Original issue reported on code.google.com by sason...@gmail.com on 10 Aug 2007 at 8:21

GoogleCodeExporter commented 8 years ago

Original comment by sason...@gmail.com on 6 Sep 2007 at 4:53

GoogleCodeExporter commented 8 years ago

Original comment by sason...@gmail.com on 6 Sep 2007 at 4:55

GoogleCodeExporter commented 8 years ago
Fixed initial problem with MethodDefs

Still need to improve included features testt in rb_f_require to ignore file 
extension and possibly to result paths.

Original comment by DrWayneK...@gmail.com on 14 Sep 2007 at 3:43