From 54d551adb333af355494394465e7ccc6c6c1bc29 Mon Sep 17 00:00:00 2001 From: kazu Date: Fri, 11 May 2018 12:12:57 +0000 Subject: Use `&.` instead of modifier if git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_syntax.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/ruby/test_syntax.rb') 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 -- cgit v1.2.3