Ticket #150 (closed defect: fixed)
invalid strings with IO.pipe and readline
| Reported by: | macosforge@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | major | Milestone: | MacRuby 0.5 |
| Component: | MacRuby | Keywords: | |
| Cc: | macosforge@… |
Description
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?
Change History
Note: See
TracTickets for help on using
tickets.

