summaryrefslogtreecommitdiff
path: root/lib/tempfile.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tempfile.rb')
-rwxr-xr-xlib/tempfile.rb2
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