Cloning ARGF in IRB results in a java.lang.ClassCastException
-------------------------------------------------------------
Key: JRUBY-1455
URL: http://jira.codehaus.org/browse/JRUBY-1455
Project: JRuby
Issue Type: Bug
Environment: trunk rev 4628
Reporter: Alexey Verkhovsky
Assignee: Thomas E Enebo
[EMAIL PROTECTED]:~/src/jruby/test$ jruby -e 'argf = ARGF.clone'
# no problem
[EMAIL PROTECTED]:~/src/jruby/test$ jruby -S irb
irb(main):001:0> argf = ARGF.clone
Exception in thread "main" java.lang.ClassCastException: org.jruby.RubyObject
cannot be cast to org.jruby.RubyArgsFile
at org.jruby.RubyArgsFileInvoker$to_s_method_0_0.call(Unknown Source)
at org.jruby.RubyObject.callMethod(RubyObject.java:513)
at
org.jruby.runtime.Dispatcher$DefaultDispatcher.callMethod(Dispatcher.java:15)
at org.jruby.RubyObject.callMethod(RubyObject.java:496)
at org.jruby.RubyObject.callMethod(RubyObject.java:484)
at org.jruby.RubyObject.inspect(RubyObject.java:1087)
at org.jruby.RubyObjectInvoker$inspect_method_0_0.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at
org.jruby.evaluator.ASTInterpreter.setupArgs(ASTInterpreter.java:2062)
at org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:991)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:80)
at
org.jruby.evaluator.ASTInterpreter.vcallNode(ASTInterpreter.java:1655)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:383)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at
org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1412)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:351)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:233)
at
org.jruby.evaluator.ASTInterpreter.yieldNode(ASTInterpreter.java:1724)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:392)
at
org.jruby.evaluator.ASTInterpreter.ensureNode(ASTInterpreter.java:968)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:248)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1001)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:233)
at
org.jruby.evaluator.ASTInterpreter.yieldNode(ASTInterpreter.java:1724)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:392)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at
org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1412)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:351)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:233)
at org.jruby.runtime.Block.yield(Block.java:198)
at org.jruby.RubyKernel.loop(RubyKernel.java:890)
at org.jruby.RubyKernelInvoker$loop_method_0_0.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1001)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:233)
at org.jruby.runtime.Block.yield(Block.java:198)
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:748)
at org.jruby.RubyKernelInvoker$rbCatch_method_1_0.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1001)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:566)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:233)
at org.jruby.runtime.Block.yield(Block.java:198)
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:748)
at org.jruby.RubyKernelInvoker$rbCatch_method_1_0.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1001)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.rootNode(ASTInterpreter.java:1510)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:357)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.Ruby.loadFile(Ruby.java:1745)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:53)
at org.jruby.runtime.load.LoadService.load(LoadService.java:214)
at org.jruby.RubyKernel.load(RubyKernel.java:680)
at org.jruby.RubyKernelInvoker$load_method_1_0.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:996)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:233)
at org.jruby.runtime.Block.call(Block.java:186)
at org.jruby.RubyProc.call(RubyProc.java:197)
at
org.jruby.internal.runtime.methods.ProcMethod.call(ProcMethod.java:67)
at
org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:60)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:80)
at __dash_e__.__file__(-e:1)
at __dash_e__.load(-e)
at org.jruby.Ruby.runScript(Ruby.java:562)
at org.jruby.Ruby.runNormally(Ruby.java:484)
at org.jruby.Ruby.runFromMain(Ruby.java:409)
at org.jruby.Main.runInterpreter(Main.java:223)
at org.jruby.Main.runInterpreter(Main.java:179)
at org.jruby.Main.run(Main.java:121)
at org.jruby.Main.main(Main.java:96)
[EMAIL PROTECTED]:~/src/jruby/test$
--
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