Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.8, JRuby 1.7.0.RC2
-
Fix Version/s: JRuby 1.7.0.RC2
-
Component/s: Core Classes/Modules, Launcher, Miscellaneous, Standard Library
-
Labels:
-
Environment:Ubuntu 12.04 AMD64.
java-7-openjdk-amd64 for JRuby 1.70-RC2
java-6-openjdk-amd64 for JRuby 1.6.8
-
Testcase included:yes
-
Number of attachments :
Description
If you read from STDIN using gets very early in the process, then it returns nil, e.g. running this in a shell
bash -c '(sleep 0; echo "Hello") | jruby -e "puts gets"'
prints out "nil", where as this almost identical script
bash -c '(sleep 4; echo "Hello") | jruby -e "puts gets"'
prints out "Hello"
This could be highly system-dependent.