Empty expressions in Hash literals crash JRuby
----------------------------------------------
Key: JRUBY-2836
URL: http://jira.codehaus.org/browse/JRUBY-2836
Project: JRuby
Issue Type: Bug
Components: RubySpec
Affects Versions: JRuby 1.1.3
Environment: Latest JRuby 1.1.3
Reporter: Vladimir Sizikov
Assignee: Thomas E Enebo
{noformat}
irb> {() => ()}
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size:
1
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at org.jruby.ast.ListNode.get(ListNode.java:150)
at org.jruby.ast.HashNode.interpret(HashNode.java:88)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
at org.jruby.ast.RootNode.interpret(RootNode.java:126)
at
org.jruby.evaluator.ASTInterpreter.evalWithBinding(ASTInterpreter.java:122)
at org.jruby.RubyKernel.eval(RubyKernel.java:836)
at org.jruby.RubyKernelInvoker$eval_s_method_0_3.call(Unknown Source)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:134)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:111)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:282)
at org.jruby.ast.FCallNode.interpret(FCallNode.java:139)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:171)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:147)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:203)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:111)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:282)
at org.jruby.ast.CallNode.interpret(CallNode.java:163)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:67)
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email