Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.4
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Mac OSX, Ubuntu Karmic
-
Testcase included:yes
-
Number of attachments :
Description
If you use a backtick operator, any data going through STDIN ends up going to that process during the time it is executing. Attached find an example that if you run it via:
cat test_file.txt | jruby test.rb
You will see "nil" whereas
cat test_file.txt | ruby test.rb
You will see "hello"
The reason for this is because of the presence of a `ls` on the first line of the script. Apparently STDIN gets corrupted due to this backtick.
Activity
Charles Oliver Nutter
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | JRuby 1.5 [ 15792 ] | |
| Assignee | Charles Oliver Nutter [ headius ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
Vladimir Sizikov
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Resolved [ 5 ] | Reopened [ 4 ] |
Charles Oliver Nutter
made changes -
| Fix Version/s | JRuby 1.5 [ 15792 ] |
Hiro Asari
made changes -
| Link |
This issue duplicates |
Hiro Asari
made changes -
| Link |
This issue duplicates |
Charles Oliver Nutter
made changes -
| Status | Reopened [ 4 ] | Resolved [ 5 ] |
| Fix Version/s | JRuby 1.7.0.pre1 [ 17049 ] | |
| Resolution | Fixed [ 1 ] |