* 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
@ -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>
|
Wed May 28 00:38:09 2014 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* test/lib/minitest/unit.rb: Use Tempfile#close! instead of
|
* test/lib/minitest/unit.rb: Use Tempfile#close! instead of
|
||||||
|
@ -263,8 +263,12 @@ class Tempfile < DelegateClass(File)
|
|||||||
|
|
||||||
# :stopdoc:
|
# :stopdoc:
|
||||||
def inspect
|
def inspect
|
||||||
|
if closed?
|
||||||
|
"#<#{self.class}:#{path} (closed)>"
|
||||||
|
else
|
||||||
"#<#{self.class}:#{path}>"
|
"#<#{self.class}:#{path}>"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class Remover
|
class Remover
|
||||||
def initialize(data)
|
def initialize(data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user