summaryrefslogtreecommitdiff
path: root/lib/tempfile.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r--lib/tempfile.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb
index 5f4e8eedf1..361d66491e 100644
--- a/lib/tempfile.rb
+++ b/lib/tempfile.rb
@@ -263,7 +263,11 @@ class Tempfile < DelegateClass(File)
# :stopdoc:
def inspect
- "#<#{self.class}:#{path}>"
+ if closed?
+ "#<#{self.class}:#{path} (closed)>"
+ else
+ "#<#{self.class}:#{path}>"
+ end
end
class Remover