summaryrefslogtreecommitdiff
path: root/lib/tempfile.rb
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-07-03 19:25:05 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-07-03 19:29:12 +0900
commite44c9b11475d0be2f63286c1332a48da1b4d8626 (patch)
treeb5e520ed40058b790f2144bd1d11b90c4e290c8b /lib/tempfile.rb
parent89cef1c56b3a0f9c5e6ccc22a5044477a4fd16c1 (diff)
Try to avoid `not delagated` error
``` .../ruby/lib/delegate.rb:405:in `__getobj__': not delegated (ArgumentError) ``` https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian9/ruby-master/log/20190703T063006Z.fail.html.gz
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r--lib/tempfile.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb
index f703709113..4678a191a7 100644
--- a/lib/tempfile.rb
+++ b/lib/tempfile.rb
@@ -234,7 +234,7 @@ class Tempfile < DelegateClass(File)
# :stopdoc:
def inspect
- if closed?
+ if @tmpfile.closed?
"#<#{self.class}:#{path} (closed)>"
else
"#<#{self.class}:#{path}>"