Open() weirdness


Is this a bug or are there known limitations for open() in jruby?

jruby 1.1.3 (ruby 1.8.6 patchlevel 114) (2008-07-20 rev 7243)
Linux keter 2.6.24-19-generic #1 SMP Wed Aug 20 17:53:40 UTC 2008 x86_64


open("| bzip2 > /tmp/", “w+”) {|io| io.write “yo”}
=> 2


open("| bzip2 > /tmp/", “w+”) {|io| io.write “yo”}
IOError: not opened for writing

Exception in thread “main” Stream Closed

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs