Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.4
-
Fix Version/s: JRuby 1.6RC3
-
Component/s: Core Classes/Modules, Intro, Windows
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
ruby -e "a,b=IO.pipe;a.close;b.puts('abc');b.close"
On non-Windows, MRI and JRuby reliably raise Errno::EPIPE, which is a proper behavior.
MRI 1.8.6 raises Errno::EINVAL (which seems to be wrong). On MRI 1.9+, MRI properly raises Errno::EPIPE.
JRuby on Windows always raises IOError. It seems to me that the proper behavior for JRuby on Windows should be raising Errno::EPIPE, to be in sync with other platforms.
See also: http://redmine.ruby-lang.org/issues/show/2559
I'm also attaching the test case.
Possible fix:
https://github.com/jruby/jruby/pull/24