Projects

Ticket #719 (closed defect: fixed)

Opened 21 months ago

Last modified 21 months ago

IO.read is broken

Reported by: watson1978@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.7
Component: MacRuby Keywords:
Cc:

Description

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"

Change History

Changed 21 months ago by martinlagardette@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.7

Fixed with r4155. Thanks for the report!

Note: See TracTickets for help on using tickets.