Use &.
instead of modifier if and remove needless closed?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6f8861433d
commit
91fc0a9103
@ -361,7 +361,7 @@ puts Tempfile.new('foo').path
|
||||
f.close
|
||||
assert_file.exist?(path)
|
||||
ensure
|
||||
f.close if f && !f.closed?
|
||||
f&.close
|
||||
File.unlink path if path
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user