From: Toshiro Kuwabara Date: 2000-08-26T21:27:04+09:00 Subject: [ruby-list:24536] Re: (RDP) tempfile.rd Toshです。 In message "[ruby-list:24517] Re: (RDP) tempfile.rd" on 00/08/26, Koji Arai writes: >> あと、Tempfile.callback(path, data)があるんですが、どう使うのか >> 僕がよくわかってないのでドキュメントに書かれてないです。 >> これってライブラリのユーザーが使う事ってあるんでしょうか? > >ないはずです。ruby本には このメソッドは proc オブジェクトで >も良さげだけど、しかし・・・といったことが書かれています。た >しか。 確かにRuby本のP.389〜390に実装上の都合らしいことが書いてあり ますね。どうもありがとうございました。 英語版修正しました。 パッチでつけます。 --- tempfile.rd~ Sat Aug 26 20:49:42 2000 +++ tempfile.rd Sat Aug 26 21:06:00 2000 @@ -18,16 +18,20 @@ --- Tempfile.new(basename[, tempdir]) --- Tempfile.open(basename[, tempdir]) Create tempfile named "((|basename|))((|pid|)).((|n|))". - ((|tempdir|)) is directory for tempfile. + + ((|tempdir|)) is directory for tempfile. Its default value + is ... + ENV['TMPDIR'] || ENV['TMP'] || ENV['TEMP'] || '/tmp' == methods: --- Tempfile#close([real]) - Close tempfile. If ((|real|)) isn't (({false})), tempfile is deleted + Close tempfile. If ((|real|)) isn't false, tempfile is deleted immediately, if not, tempfile is deleted implicitly when GC sweeped - this object. + this object. Its default value is (({false})). --- Tempfile#open - Reopen tempfile. + Reopen tempfile. It is opened as (({"r+"})), so you can read + file again. --- Tempfile#path Return path of tempfile. --- Tosh Toshiro Kuwabara