diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-18 21:19:18 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-18 21:19:18 +0000 |
commit | 7bbf2f308580f468802cd7d32c94fce1b9f1779e (patch) | |
tree | 0a680f59e70a78d60e776d7b763e618fb2fec624 /lib/tempfile.rb | |
parent | 34276148c4450faa77bb298cfbe005f7c263f802 (diff) |
* lib: Convert tabs to spaces for ruby files per
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style
Patch by Steve Klabnik [Ruby 1.9 - Bug #4730]
Patch by Jason Dew [Ruby 1.9 - Feature #4718]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r-- | lib/tempfile.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb index fbbf576b36..2b7c94f183 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -165,7 +165,7 @@ class Tempfile < DelegateClass(File) __setobj__(@tmpfile) end - def _close # :nodoc: + def _close # :nodoc: @tmpfile.close if @tmpfile @tmpfile = nil @data[1] = nil if @data @@ -316,13 +316,13 @@ class Tempfile < DelegateClass(File) tempfile = new(*args) if block_given? - begin - yield(tempfile) - ensure - tempfile.close - end + begin + yield(tempfile) + ensure + tempfile.close + end else - tempfile + tempfile end end |