[MacRuby-devel] [MacRuby] #576: It's possible to close STDOUT (and presumably other standard IO streams)
Timothy McDowell
tmcdowell at gmail.com
Sat Feb 6 11:08:00 PST 2010
I get the same IOError when I try to STDOUT.close from IRB.
On Sat, Feb 6, 2010 at 12:05 PM, MacRuby <ruby-noreply at macosforge.org>wrote:
> #576: It's possible to close STDOUT (and presumably other standard IO
> streams)
>
> -----------------------------------+----------------------------------------
> Reporter: matthew@… | Owner: lsansonetti@…
> Type: defect | Status: new
> Priority: critical | Milestone: MacRuby 0.5
> Component: MacRuby | Keywords:
>
> -----------------------------------+----------------------------------------
>
> Comment(by matthew@…):
>
> Actually I just tried this on the latest revision of 1.9.1 (p376) and I
> get this instead:
>
> {{{
> $ irb
> irb(main):001:0> STDOUT.close
> /usr/local/lib/ruby/1.9.1/irb.rb:166:in `write': closed stream (IOError)
> from /usr/local/lib/ruby/1.9.1/irb.rb:166:in `print'
> from /usr/local/lib/ruby/1.9.1/irb.rb:166:in `block (2 levels) in
> eval_input'
> from /usr/local/lib/ruby/1.9.1/irb.rb:271:in `signal_status'
> from /usr/local/lib/ruby/1.9.1/irb.rb:154:in `block in eval_input'
> from /usr/local/lib/ruby/1.9.1/irb/ruby-lex.rb:244:in `block (2
> levels) in each_top_level_statement'
> from /usr/local/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in `loop'
> from /usr/local/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in `block in
> each_top_level_statement'
> from /usr/local/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `catch'
> from /usr/local/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in
> `each_top_level_statement'
> from /usr/local/lib/ruby/1.9.1/irb.rb:153:in `eval_input'
> from /usr/local/lib/ruby/1.9.1/irb.rb:70:in `block in start'
> from /usr/local/lib/ruby/1.9.1/irb.rb:69:in `catch'
> from /usr/local/lib/ruby/1.9.1/irb.rb:69:in `start'
> from /usr/local/bin/irb:12:in `<main>'
> }}}
>
> So it seems that it is now possible? Maybe this is not an issue.
>
> Incidentally, in the latest 1.9.1 the Logger library breaks in the same
> way if logging to STDOUT and sent a close message.
>
> --
> Ticket URL: <http://www.macruby.org/trac/ticket/576#comment:4>
> MacRuby <http://macruby.org/>
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
--
--Brains.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20100206/e01a82b3/attachment.html>
More information about the MacRuby-devel
mailing list