-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Environment Information
- JRuby 9.3.15, 9.4.12.1, 10.0.1.0 on - all versions exhibited same behaviors
- Ruby tests on Ruby 2.6.10
- Win11Pro 26100.4652
Code:
bugtest.rb containing only these two lines:
puts "stdout"
$stderr.puts "stderr"Expected Behavior
Command line redirect ">" should redirect stdout stream but not stderr stream. stderr stream should remain writing to console unless stderr-specific redirect used (e.g. "2>"). Ruby 2.6.10 performs as expected:
> ruby bugtest.rb
stdout
stderr
> ruby bugtest.rb > bugtest.txt
stderr
> cat .\bugtest.txt
stdout
Actual Behavior
JRuby redirects both streams to file (removed --enable-native-access=org.jruby.dist warnings from output):
> jruby bugtest.rb
stdout
stderr
> jruby bugtest.rb > bugtestjruby.txt
> cat bugtestjruby.txt
stdout
stderr
Metadata
Metadata
Assignees
Labels
No labels