berkesokhan / rubydotnetcompiler

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

Instance variable problem with RedCloth #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
RedCloth 3.0.4 was used.

require 'redcloth'
r = RedCloth.new "Ruby.NET"
puts r.to_html

Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The
given key was not present in the dictionary.
  at
System.Collections.Generic.Dictionary`2[System.String,System.Object].get_Item
(System.String ) [0x00000] 
  at Ruby.Object.generic_ivar_get (System.Object obj, System.String id)
[0x00000] 
  at Ruby.Runtime.Eval.ivar_get (System.Object obj, System.String id)
[0x00000] 
  at Ruby.Runtime.AttrReaderMethodBody.Call0 (Ruby.Class last_class,
System.Object recv, Ruby.Runtime.Frame caller, Ruby.Proc block) [0x00000] 
  at Ruby.Runtime.Eval.CallPrivate0 (System.Object recv, Ruby.Runtime.Frame
caller, System.String methodId, Ruby.Proc block) [0x00000] 
  at _Internal.Method_hard_break.Call1 (Ruby.Class last_class,
System.Object recv, Ruby.Runtime.Frame caller, Ruby.Proc block,
System.Object text) [0x00000] 
  at Ruby.Runtime.Eval.CallPrivate1 (System.Object recv, Ruby.Runtime.Frame
caller, System.String methodId, Ruby.Proc block, System.Object arg1) [0x00000] 
  at _Internal.Method_to_html.Calln (Ruby.Class last_class, System.Object
recv, Ruby.Runtime.Frame caller, Ruby.Runtime.ArgList args) [0x00000] 
  at Ruby.Runtime.MethodBody.Call0 (Ruby.Class last_class, System.Object
recv, Ruby.Runtime.Frame caller, Ruby.Proc block) [0x00000] 
  at Ruby.Runtime.Eval.CallPublic0 (System.Object recv, Ruby.Runtime.Frame
caller, System.String methodId, Ruby.Proc block) [0x00000] 
  at _Internal.SourceFile_r.Load (System.Object recv, Ruby.Runtime.Frame
caller) [0x00000] 
  at <Module>.Main (System.String[] args) [0x00000] 
  at (wrapper managed-to-native)
System.Reflection.MonoMethod:InternalInvoke (object,object[])
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000]

Original issue reported on code.google.com by sanxiyn on 12 Oct 2007 at 1:51

GoogleCodeExporter commented 9 years ago
Test case:

  class C < String
    def m
      @v1 = 1
      @v2
    end
  end
  C.new.m

Original comment by sason...@gmail.com on 12 Oct 2007 at 12:11

GoogleCodeExporter commented 9 years ago

Original comment by meaningi...@gmail.com on 16 Oct 2007 at 6:38