diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-11 12:12:57 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-11 12:12:57 +0000 |
commit | 54d551adb333af355494394465e7ccc6c6c1bc29 (patch) | |
tree | fade0b48c6d706bfeac543b1ce10b2bc6c354d45 /test/ruby/test_syntax.rb | |
parent | 23a685a5f7a0e1b23af76ae525aa68773effbff5 (diff) | |
download | ruby-54d551adb333af355494394465e7ccc6c6c1bc29.tar.gz |
Use `&.` instead of modifier if
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r-- | test/ruby/test_syntax.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index b9316ec669..6798543fbd 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -46,7 +46,7 @@ class TestSyntax < Test::Unit::TestCase assert_raise(ArgumentError, enc.name) {load(f.path)} end ensure - f.close! if f + f&.close! end def test_script_lines @@ -63,7 +63,7 @@ class TestSyntax < Test::Unit::TestCase end end ensure - f.close! if f + f&.close! end def test_newline_in_block_parameters |