On Wed, 22 Dec 2004, Yukihiro Matsumoto wrote: > > Hello, > > Ruby 1.8.2 preview 4 is available from > > ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.2-preview4.tar.gz > md5sum: 2f53d4dc4b24e37799143645772aabd0 > > The final 1.8.2 will be out on December 25th (JST), unless any > critical bugs will be found. > The following example (taken from the PickAxe2 documentation of IO#reopen) doesn't work in preview4: File.open("testfile", "w") do |f| 5.times do |i| f.puts "This is line #{i}" end end f1 = File.new("testfile") f2 = File.new("testfile") puts f2.readlines[0] f2.reopen(f1) puts f2.readlines[0] Output in preview3: This is line 0 This is line 0 Output in preview4: This is line 0 test-reopen.rb:12:in `readlines': not opened for reading (IOError) from test-reopen.rb:12 /Johan Holmberg