summaryrefslogtreecommitdiff
path: root/test/yarp/compiler_test.rb
diff options
context:
space:
mode:
authorYusuke Endoh <[email protected]>2023-09-05 17:35:28 +0900
committerYusuke Endoh <[email protected]>2023-09-05 17:35:28 +0900
commit5b146eb5a15cce4c7a6ce279bd53e75a61d4a1f5 (patch)
treee80b78476b623a6d4f04d72c4c4a2c000ab19679 /test/yarp/compiler_test.rb
parent77db0ca6c881b6fc705873f471fe4c52bffc0d50 (diff)
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
Diffstat (limited to 'test/yarp/compiler_test.rb')
-rw-r--r--test/yarp/compiler_test.rb8
1 files 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")