зеркало из https://github.com/github/ruby.git
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:
Родитель
6f8861433d
Коммит
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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче