[前][次][番号順一覧][スレッド一覧]

ruby-changes:67668

From: Yusuke <ko1@a...>
Date: Thu, 9 Sep 2021 23:35:23 +0900 (JST)
Subject: [ruby-changes:67668] 141db4f383 (master): test/psych/test_scalar_scanner.rb: Prevent a warning

https://git.ruby-lang.org/ruby.git/commit/?id=141db4f383

From 141db4f383b6cb74bf17aa8b5deeaa04d313946d Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Thu, 9 Sep 2021 23:34:30 +0900
Subject: test/psych/test_scalar_scanner.rb: Prevent a warning

```
[ 4696/20990] TestAst#test_ranges:test/psych/test_scalar_scanner.rb(none):138: warning: ambiguous first argument; put parentheses or a space even after `-' operator
```
http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20210909T123007Z.log.html.gz
---
 test/psych/test_scalar_scanner.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/psych/test_scalar_scanner.rb b/test/psych/test_scalar_scanner.rb
index abd5515..ebc9fbd 100644
--- a/test/psych/test_scalar_scanner.rb
+++ b/test/psych/test_scalar_scanner.rb
@@ -135,7 +135,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_scalar_scanner.rb#L135
 
       assert_equal 1, ss.tokenize('1')
       assert_equal 1, ss.tokenize('+1')
-      assert_equal -1, ss.tokenize('-1')
+      assert_equal(-1, ss.tokenize('-1'))
 
       assert_equal 0b010101010, ss.tokenize('0b010101010')
       assert_equal 0b010101010, ss.tokenize('0b0,1_0,1_,0,1_01,0')
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]