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:
parent
9b612d382d
commit
592c6ba3b3
2 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue