You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"
Reported by rogerpack2005, May 28, 2011
Run the following code:
importjava.util.ArrayListinterfaceCallableOneArgdodefcall(arg1:Object):Objectendend# should I make this class static? cache it [in a hash]?classRubyInt < Objectdeftimes(call_me:CallableOneArg):ObjectselfendendRubyInt.new.timesdo |n|
end
=> Mirah::InternalCompilerError: undefined method `each' for nil:NilClass
The problem was that a Block with an empty body was being transformed into an AST node with a nil body.
The typer then checks the body to see if it contains any method definitions and if it does it appends them to the class representing the block.
The code was blowing up where it checked for children of the body because the body was nil. Now the body will be an AST node with no children.
"
Reported by rogerpack2005, May 28, 2011
Run the following code:
=> Mirah::InternalCompilerError: undefined method `each' for nil:NilClass
"
http://code.google.com/p/mirah/issues/detail?id=61
The text was updated successfully, but these errors were encountered: