IO.select throws ArrayIndexOutOfBoundsException 
------------------------------------------------

                 Key: JRUBY-5936
                 URL: https://jira.codehaus.org/browse/JRUBY-5936
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6.3, JRuby 1.6.2
         Environment: Linux  2.6.38-8-generic-pae #42-Ubuntu SMP i686 i686 i386 
GNU/Linux

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)



            Reporter: Javier Alcazar
            Assignee: Thomas E Enebo


IO.select is throwing ArrayIndexOutOfBoundsException, MRI's 1.9.2 and 1.8.7 are 
working as expected

(jalcazar@xps ~)$ rvm use 1.9.2
Using /home/jalcazar/.rvm/gems/ruby-1.9.2-p180
(jalcazar@xps ~)$ irb
ruby-1.9.2-p180 :001 > IO.select([$stdin],[$stdout,$stderr],nil)
 => [[], [#<IO:<STDOUT>>, #<IO:<STDERR>>], []] 
ruby-1.9.2-p180 :002 > quit

(jalcazar@xps ~)$ rvm use 1.8.7
Using /home/jalcazar/.rvm/gems/ruby-1.8.7-p352
(jalcazar@xps ~)$ irb
ruby-1.8.7-p352 :001 > IO.select([$stdin],[$stdout,$stderr],nil)
 => [[], [#<IO:0xb757a564>, #<IO:0xb757a550>], []] 
ruby-1.8.7-p352 :002 > quit

(jalcazar@xps ~)$ rvm use jruby
Using /home/jalcazar/.rvm/gems/jruby-1.6.2
(jalcazar@xps ~)$ irb
jruby-1.6.2 :001 > IO.select([$stdin],[$stdout,$stderr],nil)
Java::JavaLang::ArrayIndexOutOfBoundsException: 1
        from org.jruby.util.io.SelectBlob.trySelectWrite(SelectBlob.java:194)
        from org.jruby.util.io.SelectBlob.processWrites(SelectBlob.java:160)
        from org.jruby.util.io.SelectBlob.goForIt(SelectBlob.java:62)
        from org.jruby.RubyIO.select_static(RubyIO.java:3294)
        from org.jruby.RubyIO.select(RubyIO.java:3290)
        from org.jruby.RubyIO$s$0$3$select.call(RubyIO$s$0$3$select.gen:65535)
        from 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:638)
        from 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:223)
        from 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:322)
        from 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:207)
        from org.jruby.ast.CallThreeArgNode.interpret(CallThreeArgNode.java:61)
        from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        from org.jruby.ast.RootNode.interpret(RootNode.java:129)
        from 
org.jruby.evaluator.ASTInterpreter.INTERPRET_EVAL(ASTInterpreter.java:96)
        from 
org.jruby.evaluator.ASTInterpreter.evalWithBinding(ASTInterpreter.java:161)
        from org.jruby.RubyKernel.evalCommon(RubyKernel.java:1135)
... 122 levels...
        from org.jruby.ast.BlockNode.interpret(BlockNode.java:71)


--
This message is automatically generated by JIRA.
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