Mac OS X の ruby 1.9.1p378 で再 open 後 delete した Tempfile が closed

e$B$-$7$b$H$G$9e(B

trunk e$B$K;D$C$F$$$k$+$I$&$+$o$+$j$^$;$s$,!"e(BMacPorts e$B$Ne(B ruby
1.9 e$B$Ge(B
e$B0J2<$N$h$&$J%P%0$r3NG$7$^$7$?!#!Je(Bruby 1.8
e$B$G$O%(%i!<$K$J$i$J$$$N$Ge(B
e$B%P%[email protected]$H;W$$$^$9!Ke(B

$ ruby1.9 -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10]

$ cat hoge.rb
require tempfile

tempfile = Tempfile.open hoge
tempfile.write hoge\n
tempfile.close
tempfile.open
tempfile.delete
print tempfile.read

$ ruby1.9 hoge.rb
hoge.rb:8:in `read: closed stream (IOError)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs