#719: IO.read is broken
----------------------------------+-----------------------------------------
Reporter: watson1...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Please execute a following script.
{{{
File.unlink("tmp.txt") if(File.exist?("tmp.txt"))
File.open("tmp.txt", "a+") { |f|
s = "xxxxxxxx"
f.print "a"
f.rewind
f.read(nil, s)
p s
}
}}}
When I executed a script, I am expecting to output a "a".
When I execute it at ruby1.9.1,
{{{
$ ruby -v test_io_read.rb
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10]
"a"
}}}
But, When I execute it at MacRuby trunk head,
{{{
$ macruby -v test_io_read.rb
MacRuby version 0.7 (ruby 1.9.0) [universal-darwin10.0, x86_64]
"xxxxxxxxa"
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/719>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel