Issue #4592 has been updated by mame (Yusuke Endoh).


?????????????????????????????????????????????????????????????????????????


shyouhei (Shyouhei Urabe) wrote:
> * close??????????????????諦?????close???????????????????????????????mv??????????????????????????????
>    irb(main):001:0> f = Tempfile.new('')
>    => #<File:/tmp/20110421-7098-1bvjwc0>
>    irb(main):002:0> f.puts("foobar")
>    => nil
>    irb(main):003:0> f.close; File.rename(f, "tmp.txt")
>    => 0
>    irb(main):008:0> File.read("tmp.txt")
>    => "foobar\n"

??????????GC ???????????????失?????????????????(f.close ???????? GC)
???????rename ???????????????????????????????????????????????? tempfile ???
GC ???????????????????????????????????????????????????????
????????workaround ???????楣奨??????????????????????????????


> * /tmp???Ruby????????????????????????????????????????????????????????????????????????????????????????

???????????????Tempfile ???????????????????????????????????????????????????????


> * Tempfile?????????????????????????Tempfile?????????????????転???????????????????????????

??????????人???????????????????????????????temporary ???????????????????????
永????????????????????????????????????????????????????????????????



akr (Akira Tanaka) wrote:
> remove_finalizer ???????save ?????????????????????????????????????????????????????????????????????????????????

Tempfile#persist ???????????????????????議???????????????????

-- 
Yusuke Endoh <mame / tsg.ne.jp>
----------------------------------------
Feature #4592: Tempfile?????桦???????????
https://bugs.ruby-lang.org/issues/4592#change-25527

Author: xibbar (Takeyuki Fujioka)
Status: Assigned
Priority: Normal
Assignee: mame (Yusuke Endoh)
Category: lib
Target version: 


=begin
Tempfile?????????????????????????????????????????#close??????????
????????????????????????????
Tempfile??????????????????????????
???読???????????????込??????????????????????
???????????????????????????????????????
????????????????????????????????????????????????
大????????????????????
Tempfile#save ?????????????????????????????
close??????????????????????????
読???????????????????????????????????????????????????????
10MB?度??????????????????????????500M???????Tempfile??????
?????????????????????????????????????

#save ???? #save! ??????????????????????議?????????????????????????????
=end



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