Kernel#select's read_array parameter is not respected -----------------------------------------------------
Key: JRUBY-5487 URL: http://jira.codehaus.org/browse/JRUBY-5487 Project: JRuby Issue Type: Bug Components: Core Classes/Modules Affects Versions: JRuby 1.5.6 Environment: Linux desk4 2.6.32-28-generic #55-Ubuntu SMP Mon Jan 10 23:42:43 UTC 2011 x86_64 GNU/Linux java version "1.6.0_22" Java(TM) SE Runtime Environment (build 1.6.0_22-b04) Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode) Reporter: Alex Young Attachments: test_select.rb When calling Kernel.select with a timeout of 0, it seems to expect the read_array, write_array and error_array to be identical. If they aren't, it gives the wrong result. For instance, if client_sock is known to have data ready for reading, this code fails, as the readables array comes back as nil: readables,_,_ = Kernel.select([client_sock], nil, nil, 0) p readables[0].readline It works fine on MRI 1.8.7-p302 and 1.9.2-p136. The attached test case shows the problem in (a little) more detail. -- 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