From 5b146eb5a15cce4c7a6ce279bd53e75a61d4a1f5 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Tue, 5 Sep 2023 17:35:28 +0900 Subject: [PATCH] Prevent "ambiguous first argument" warnings ``` /home/chkbuild/chkbuild/tmp/build/20230905T063003Z/ruby/test/yarp/compiler_test.rb:16: warning: ambiguous first argument; put parentheses or a space even after `+' operator /home/chkbuild/chkbuild/tmp/build/20230905T063003Z/ruby/test/yarp/compiler_test.rb:17: warning: ambiguous first argument; put parentheses or a space even after `-' operator /home/chkbuild/chkbuild/tmp/build/20230905T063003Z/ruby/test/yarp/compiler_test.rb:28: warning: ambiguous first argument; put parentheses or a space even after `+' operator /home/chkbuild/chkbuild/tmp/build/20230905T063003Z/ruby/test/yarp/compiler_test.rb:29: warning: ambiguous first argument; put parentheses or a space even after `-' operator ``` http://rubyci.s3.amazonaws.com/debian10/ruby-master/log/20230905T063003Z.log.html.gz --- test/yarp/compiler_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/yarp/compiler_test.rb b/test/yarp/compiler_test.rb index 7188defa7f..b601ea585d 100644 --- a/test/yarp/compiler_test.rb +++ b/test/yarp/compiler_test.rb @@ -13,8 +13,8 @@ module YARP def test_FloatNode assert_equal 1.0, compile("1.0") assert_equal 1.0e0, compile("1.0e0") - assert_equal +1.0e+0, compile("+1.0e+0") - assert_equal -1.0e-0, compile("-1.0e-0") + assert_equal(+1.0e+0, compile("+1.0e+0")) + assert_equal(-1.0e-0, compile("-1.0e-0")) end def test_ImaginaryNode @@ -25,8 +25,8 @@ module YARP def test_IntegerNode assert_equal 1, compile("1") - assert_equal +1, compile("+1") - assert_equal -1, compile("-1") + assert_equal(+1, compile("+1")) + assert_equal(-1, compile("-1")) # assert_equal 0x10, compile("0x10") # assert_equal 0b10, compile("0b10") # assert_equal 0o10, compile("0o10")