ruby-changes:34110
From: akr <ko1@a...>
Date: Wed, 28 May 2014 01:03:40 +0900 (JST)
Subject: [ruby-changes:34110] akr:r46191 (trunk): * lib/tempfile.rb (Tempfile#inspect): Show "(closed)" if the tempfile
akr 2014-05-28 01:03:35 +0900 (Wed, 28 May 2014) New Revision: 46191 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=46191 Log: * lib/tempfile.rb (Tempfile#inspect): Show "(closed)" if the tempfile is closed. Modified files: trunk/ChangeLog trunk/lib/tempfile.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 46190) +++ ChangeLog (revision 46191) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed May 28 01:02:54 2014 Tanaka Akira <akr@f...> + + * lib/tempfile.rb (Tempfile#inspect): Show "(closed)" if the tempfile + is closed. + Wed May 28 00:38:09 2014 Tanaka Akira <akr@f...> * test/lib/minitest/unit.rb: Use Tempfile#close! instead of Index: lib/tempfile.rb =================================================================== --- lib/tempfile.rb (revision 46190) +++ lib/tempfile.rb (revision 46191) @@ -263,7 +263,11 @@ class Tempfile < DelegateClass(File) https://github.com/ruby/ruby/blob/trunk/lib/tempfile.rb#L263 # :stopdoc: def inspect - "#<#{self.class}:#{path}>" + if closed? + "#<#{self.class}:#{path} (closed)>" + else + "#<#{self.class}:#{path}>" + end end class Remover -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/