1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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:
kazu 2018-06-11 14:13:56 +00:00
parent 6f8861433d
commit 91fc0a9103

View file

@ -361,7 +361,7 @@ puts Tempfile.new('foo').path
f.close f.close
assert_file.exist?(path) assert_file.exist?(path)
ensure ensure
f.close if f && !f.closed? f&.close
File.unlink path if path File.unlink path if path
end end