IO#select does not work with nor File nethiner stdio streams
-------------------------------------------------------------
Key: JRUBY-2079
URL: http://jira.codehaus.org/browse/JRUBY-2079
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1RC1
Environment: Latest JRuby 1.1RC1
Reporter: Vladimir Sizikov
Fix For: JRuby 1.1RC2
IO#select always returns nil with JRuby, when Files or standard streams are
used:
p select(nil, [STDOUT], nil, 40) # == > nil
f = File.open("/tmp/blah.txt", "r+")
p select(nil, [f], nil, 40) #==> nil
f.close
Looking at the code, in registerSelect(), there is a check:
channel instanceof SelectableChannel
And the method does nothing for non-selectable channels.
Both, file channels and stdio channels are non-selectable, so they don't work.
--
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