Issue #1755 has been updated by Run Paint Run Run.


Thanks, nobu. There's some related oddness, however:

  $ echo -e "ant\nalien\n" > a
  $ echo -e "bear\nbison\n" > b
  $ cat reopen.rb 
  
  a = File.open('a')
  b = File.open('b')
  a.gets
  b.reopen(a)
  p b.gets
  
  $ ruby -v reopen.rb 
  ruby 1.9.2dev (2009-08-02 trunk 24352) [i686-linux]
  "alien\n"
  
  $ ruby86 -v reopen.rb 
  ruby 1.8.6 (2009-07-20 patchlevel 381) [i686-linux]
  nil

  $ cat reopen2.rb 
  a = File.open('a')
  b = File.open('b')
  a.reopen(b)
  a.gets
  a.reopen(b)
  p a.gets

  $ ruby -v reopen2.rb 
  ruby 1.9.2dev (2009-08-02 trunk 24352) [i686-linux]
  nil

  $ ruby86 -v reopen2.rb 
  ruby 1.8.6 (2009-07-20 patchlevel 381) [i686-linux]
  "bear\n"

Also, what are we to do about 1.8 not copying across the #pos? Will r24144 fix that, or shall I open a separate ticket for 1.8? 

----------------------------------------
http://redmine.ruby-lang.org/issues/show/1755

----------------------------------------
http://redmine.ruby-lang.org