Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

STDOUT/STDERR cannot be reopen'ed #275

luislavena opened this Issue Apr 28, 2010 · 2 comments


None yet
3 participants

luislavena commented Apr 28, 2010


In mongrel tests, we have some console IO redirection to catch STDERR and STDOUT output.

The code is pretty simple:


But I'm experiencing Errno::ENOENT, as shown below from irb:

rbx-head > STDERR.reopen("foo.txt")
Errno::ENOENT: No such file or directory - foo.txt
   from Errno.handle at kernel/common/errno.rb:16
   from IO#reopen at kernel/common/io.rb:1416
   from Object#irb_binding {} at (irb):4

This works in Ruby 1.8, 1.9.1, 1.9.2 and JRuby from 1.4.0 to 1.5.0.RC2, but not in rubinius.


evanphx commented May 5, 2010

Fixed in 6fceb30

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment