# Mac OS X $B$N(B ruby 1.9.1p378 $B$G:F(B open $B8e(B delete $B$7$?(B Tempfile $B$,(B closed

**URL:** <https://www.ruby-forum.com/t/mac-os-x-b-n-b-ruby-1-9-1p378-b-g-f-b-open-b8e-b-delete-b-7-b-tempfile-b-b-closed/186972>\
**Category:** Development\
**Created:** [April 15, 2010, 3:44am UTC](https://www.ruby-forum.com/t/mac-os-x-b-n-b-ruby-1-9-1p378-b-g-f-b-open-b8e-b-delete-b-7-b-tempfile-b-b-closed/186972 "2010-04-15T03:44:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KISHIMOTOS\_Makoto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8baadc/32.png) [@KISHIMOTOS\_Makoto](https://www.ruby-forum.com/u/KISHIMOTOS_Makoto)\
**Post date:** [April 15, 2010, 3:44am UTC](https://www.ruby-forum.com/t/mac-os-x-b-n-b-ruby-1-9-1p378-b-g-f-b-open-b8e-b-delete-b-7-b-tempfile-b-b-closed/186972/1 "2010-04-15T03:44:01Z")

</div>

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%0$@$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)
