Nullpointer exception in jirb when wrong number of arguments
------------------------------------------------------------

                 Key: JRUBY-959
                 URL: http://jira.codehaus.org/browse/JRUBY-959
             Project: JRuby
          Issue Type: Bug
          Components: Parser
    Affects Versions: JRuby 1.0.0RC2
         Environment: Linux -generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 
GNU/Linux
ruby 1.8.5 (2007-05-17 rev 3672) [i386-jruby1.0.0RC2]

            Reporter: Lars Westergren
            Priority: Minor


Did this typo when doing a Ruby tutorial in jirb:

  5.times print { "Hello, JRuby "}

Result on mri irb:

nilArgumentError: wrong number of arguments (1 for 0)
        from (irb):2:in `times'
        from (irb):2


Result on jirb:

NativeException: java.lang.NullPointerException: null
        from RubyIO.java:732:in `org.jruby.RubyIO.print'
        from null:-1:in `org.jruby.RubyIOInvokerprintxx1.call'
        from FastInvocationCallback.java:49:in 
`org.jruby.runtime.callback.FastInvocationCallback.execute'
        from SimpleCallbackMethod.java:81:in 
`org.jruby.internal.runtime.methods.SimpleCallbackMethod.call'
        from RubyObject.java:572:in `org.jruby.RubyObject.callMethod'
        from RubyObject.java:446:in `org.jruby.RubyObject.callMethod'
        from RubyKernel.java:418:in `org.jruby.RubyKernel.print'
        from null:-1:in `org.jruby.RubyKernelInvokerSprintxx1.call'
        from FastInvocationCallback.java:49:in 
`org.jruby.runtime.callback.FastInvocationCallback.execute'
        from SimpleCallbackMethod.java:81:in 
`org.jruby.internal.runtime.methods.SimpleCallbackMethod.call'
        from RubyObject.java:572:in `org.jruby.RubyObject.callMethod'
        from EvaluationState.java:1020:in 
`org.jruby.evaluator.EvaluationState.fCallNode'
        from EvaluationState.java:251:in 
`org.jruby.evaluator.EvaluationState.evalInternal'
        from EvaluationState.java:2154:in 
`org.jruby.evaluator.EvaluationState.setupArgs'
        from EvaluationState.java:539:in 
`org.jruby.evaluator.EvaluationState.callNode'
        from EvaluationState.java:205:in 
`org.jruby.evaluator.EvaluationState.evalInternal'
... 379 levels...
        from EvaluationState.java:251:in 
`org.jruby.evaluator.EvaluationState.evalInternal'
        from EvaluationState.java:521:in 
`org.jruby.evaluator.EvaluationState.blockNode'
        from EvaluationState.java:199:in 
`org.jruby.evaluator.EvaluationState.evalInternal'
        from EvaluationState.java:162:in 
`org.jruby.evaluator.EvaluationState.eval'
        from DefaultMethod.java:185:in 
`org.jruby.internal.runtime.methods.DefaultMethod.internalCall'
        from DynamicMethod.java:79:in 
`org.jruby.internal.runtime.methods.DynamicMethod.call'
        from DefaultMethod.java:133:in 
`org.jruby.internal.runtime.methods.DefaultMethod.call'
        from RubyObject.java:510:in `org.jruby.RubyObject.compilerCallMethod'
        from CompilerHelpers.java:123:in 
`org.jruby.javasupport.util.CompilerHelpers.doInvokeDynamic'
        from EVAL27334345:13:in `EVAL27334345.__file__'
        from EVAL27334345:-1:in `EVAL27334345.run'
        from Ruby.java:306:in `org.jruby.Ruby.compileOrFallbackAndRun'
        from Main.java:233:in `org.jruby.Main.runInterpreter'
        from Main.java:190:in `org.jruby.Main.runInterpreter'
        from Main.java:120:in `org.jruby.Main.run'
        from Main.java:95:in `org.jruby.Main.main'


JIrb didn't crash though, but an ugly exception printout.

-- 
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

Reply via email to