From e44c9b11475d0be2f63286c1332a48da1b4d8626 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Wed, 3 Jul 2019 19:25:05 +0900 Subject: 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 --- lib/tempfile.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/tempfile.rb') 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}>" -- cgit v1.2.3