ruby-changes:51187
From: kazu <ko1@a...>
Date: Fri, 11 May 2018 21:13:03 +0900 (JST)
Subject: [ruby-changes:51187] kazu:r63394 (trunk): Use `&.` instead of modifier if
kazu 2018-05-11 21:12:57 +0900 (Fri, 11 May 2018) New Revision: 63394 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63394 Log: Use `&.` instead of modifier if Modified files: trunk/test/ruby/test_syntax.rb Index: test/ruby/test_syntax.rb =================================================================== --- test/ruby/test_syntax.rb (revision 63393) +++ test/ruby/test_syntax.rb (revision 63394) @@ -46,7 +46,7 @@ class TestSyntax < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_syntax.rb#L46 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 https://github.com/ruby/ruby/blob/trunk/test/ruby/test_syntax.rb#L63 end end ensure - f.close! if f + f&.close! end def test_newline_in_block_parameters -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/