aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-11 12:12:57 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-11 12:12:57 +0000
commit0f4b4684cc93db5d83ba813c8bce4ffb2370a8f8 (patch)
treefade0b48c6d706bfeac543b1ce10b2bc6c354d45 /test
parentbd97ca443f6ca7e01c6ec933c652834f33f69231 (diff)
downloadruby-0f4b4684cc93db5d83ba813c8bce4ffb2370a8f8.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')
-rw-r--r--test/ruby/test_syntax.rb4
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