Kernel#select with non-array argument crashes JRuby
---------------------------------------------------

                 Key: JRUBY-2633
                 URL: http://jira.codehaus.org/browse/JRUBY-2633
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1.2
         Environment: Latest JRuby
            Reporter: Vladimir Sizikov
            Assignee: Vladimir Sizikov
             Fix For: JRuby 1.1.3


{noformat}
jruby -e "select(5)"
Exception in thread "main" java.lang.ClassCastException: org.jruby.RubyFixnum 
cannot be cast to org.jruby.RubyArray
        at org.jruby.RubyIO.select_static(RubyIO.java:2531)
        at org.jruby.RubyKernel.select(RubyKernel.java:591)
        at org.jruby.RubyKernelInvoker$select_s_method_0_3.call(Unknown Source)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodNoBlock.call(JavaMethod.java:63)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:78)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:149)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:356)
        at ruby.__dash_e__.__file__(-e:1)
        at ruby.__dash_e__.__file__(-e)
        at ruby.__dash_e__.load(-e)
        at org.jruby.Ruby.runScript(Ruby.java:520)
        at org.jruby.Ruby.runNormally(Ruby.java:440)
        at org.jruby.Ruby.runFromMain(Ruby.java:320)
        at org.jruby.Main.run(Main.java:184)
        at org.jruby.Main.run(Main.java:91)
        at org.jruby.Main.main(Main.java:82)
{noformat}

Will fix.


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