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.
I'm also attaching the test case.