diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-01 13:54:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-01 13:54:01 +0000 |
commit | 5e02a28a8b5e6defca76c4f3ee76bc48f0ce67b2 (patch) | |
tree | 10a108ea86dc514019b01f42351998119464ba01 /lib | |
parent | 9ad152e55580b497cbba4c7a15d20cba8e3ef1f5 (diff) |
* lib/tempfile.rb (Tempfile#size): stat by path name when it is
closed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/tempfile.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb index 79dd5cc02c..c45865d7a3 100755 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -255,6 +255,8 @@ class Tempfile < DelegateClass(File) if @tmpfile @tmpfile.flush @tmpfile.stat.size + elsif @tmpname + File.size(@tmpname) else 0 end |