1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/tempfile.rb (Tempfile#inspect): Show "(closed)" if the tempfile

is closed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-05-27 16:03:35 +00:00
parent 9b612d382d
commit 592c6ba3b3
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Wed May 28 01:02:54 2014 Tanaka Akira <akr@fsij.org>
* lib/tempfile.rb (Tempfile#inspect): Show "(closed)" if the tempfile
is closed.
Wed May 28 00:38:09 2014 Tanaka Akira <akr@fsij.org>
* test/lib/minitest/unit.rb: Use Tempfile#close! instead of

View file

@ -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