[MacRuby-devel] [MacRuby] #719: IO.read is broken

MacRuby ruby-noreply at macosforge.org
Sat May 15 17:14:18 PDT 2010


#719: IO.read is broken
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     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/>



More information about the MacRuby-devel mailing list