[MacRuby] #1429: STDIN.eof? consumes first input character

MacRuby ruby-noreply at macosforge.org
Tue Dec 13 17:30:02 PST 2011


#1429: STDIN.eof? consumes first input character
--------------------------------+-------------------------------------------
 Reporter:  lastobelus@…        |       Owner:  lsansonetti@…        
     Type:  defect              |      Status:  new                  
 Priority:  blocker             |   Milestone:                       
Component:  MacRuby             |    Keywords:                       
--------------------------------+-------------------------------------------

Comment(by lastobelus@…):

 I ended up doing this:
 {{{
 STDIN.define_singleton_method(:eof?) { false }
 }}}

 which was fine for my purpose, but would be a problem for client code that
 checks eof? and does not also check if  gets/readline returns nil

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1429#comment:1>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list