[Bug:trunk] various behavior when reopening File twice

e$B1sF#$G$9!#e(B

e$B2<5-$N$h$&$K!“FI$_$+$1$Ne(B File e$B%$%s%9%?%s%9$r;H$C$Fe(B 2
e$B2se(B reopen e$B$7$?e(B
e$B$H$-$N5sF0$,!”%P!<%8%g%s$K$h$C$F$^$A$^$A$G$9!#e(B

$ cat foo.txt
1
2
3

$ cat bar.txt
a
b
c

$ cat t.rb
f1 = File.new(“foo.txt”)
f2 = File.new(“bar.txt”)
f1.reopen(f2)
f1.gets
f1.gets
p f1.reopen(f2).gets

$ ruby18 -v t.rb
ruby 1.8.8dev (2010-01-27 revision 26440) [i686-linux]
“a\n”

$ ruby-1.9.1-p378 -v t.rb
ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]
nil

$ ./ruby -v t.rb
ruby 1.9.2dev (2010-01-31 trunk 26528) [i686-linux]
“c\n”

e$B$I$&$J$k$N$,@52r$G$7$g$&$+!#e(B

e$B%A%1%C%He(B #2700 e$B$,99?7$5$l$^$7$?!#e(B (by ujihisa .)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BAssignede$B$KJQ99e(B
e$BC4Ev<Te(B Nobuyoshi N.e$B$K%;%C%He(B

e$B$3$N%A%1%C%H$,;29M$K$J$k$H;W$$$^$9!#e(B
http://redmine.ruby-lang.org/issues/show/2516

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

e$B%A%1%C%He(B #2700 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.)

e$B%9%F!<%?%9e(B Assignede$B$+$ie(BRejectede$B$KJQ99e(B

e$B1sF#$G$9!#e(B

1.9.2 e$B$G$O;EMM$H$$$&$3$H$Ge(B reject e$B$7$^$9!#e(B([ruby-core:28335]
e$BB>e(B)

e$B$o$+$j$K$/$$5sF0$J$3$H$O3N$+$J$N$G!"e(B1.9.3 e$B0J9_$G$N2~A1$re(B
Feature
e$B%A%1%C%H$H$7$FJL$KEPO?$7$F$*$-$^$9!#e(B


Yusuke E. [email protected]

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