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

MacRuby ruby-noreply at macosforge.org
Mon Apr 16 21:25:35 PDT 2012


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

Comment(by chris@…):

 I was not able to reproduce this as of git revision:
 eabb31c50770c22979477c00536a09bede2ed303

 {{{
 def test
   STDIN.eof?
   STDIN.gets
 end

 x = test

 if x == "foo\n"
   puts "PASS"
 else
   puts "FAIL, got '#{x}'"
 end

 ➜  MacRuby git:(master) ✗ echo "foo" | ./macruby test_io.rb
 PASS
 }}}

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



More information about the macruby-tickets mailing list