[MacRuby-devel] [MacRuby] #150: invalid strings with IO.pipe and readline

MacRuby ruby-noreply at macosforge.org
Mon Nov 3 19:51:36 PST 2008


#150: invalid strings with IO.pipe and readline
----------------------------------------------+-----------------------------
 Reporter:  macosforge at brian.codekitchen.net  |       Owner:  lsansonetti at apple.com
     Type:  defect                            |      Status:  new                  
 Priority:  major                             |   Milestone:                       
Component:  MacRuby                           |    Keywords:                       
----------------------------------------------+-----------------------------
 Test case:

 {{{
 #!/usr/local/bin/macruby

 r, w = IO.pipe
 w.write("test\r\n")
 l = r.readline("\r\n")

 puts l.chomp("\r\n").inspect # ruby1.9: "test", macruby: "test\r\n"

 puts l.match("e")[0].inspect # ruby1.9: "e", macruby: " "
 }}}

 Calling readline on an IO.pipe stream with a delimiter causes really odd
 strings to be returned, they don't behave correctly in a number of cases
 including the two shown. Possibly an encoding issue?

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/150>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list