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

ruby-changes:66261

From: Yusuke <ko1@a...>
Date: Tue, 18 May 2021 19:02:38 +0900 (JST)
Subject: [ruby-changes:66261] 837cbea64b (master): test/psych/test_coder.rb: Suppress non-parenthesis warnings

https://git.ruby-lang.org/ruby.git/commit/?id=837cbea64b

From 837cbea64b74d464bfbfb10e6c81a8f92c6eee71 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Tue, 18 May 2021 19:01:27 +0900
Subject: test/psych/test_coder.rb: Suppress non-parenthesis warnings

http://rubyci.s3.amazonaws.com/debian9/ruby-master/log/20210518T093002Z.log.html.gz
```
/home/chkbuild/chkbuild/tmp/build/20210518T093002Z/ruby/test/psych/test_coder.rb:277: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
```
---
 test/psych/test_coder.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/psych/test_coder.rb b/test/psych/test_coder.rb
index f6840ab..b2be0a4 100644
--- a/test/psych/test_coder.rb
+++ b/test/psych/test_coder.rb
@@ -274,7 +274,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L274
 
     def test_coder_style_scalar_default
       foo = Psych.dump 'some scalar'
-      assert_match /\A--- some scalar\n(?:\.\.\.\n)?\z/, foo
+      assert_match(/\A--- some scalar\n(?:\.\.\.\n)?\z/, foo)
     end
 
     def test_coder_style_scalar_any
@@ -282,7 +282,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L282
         scalar: 'some scalar',
         style: Psych::Nodes::Scalar::ANY,
         tag: nil
-      assert_match /\A--- some scalar\n(?:\.\.\.\n)?\z/, foo
+      assert_match(/\A--- some scalar\n(?:\.\.\.\n)?\z/, foo)
     end
 
     def test_coder_style_scalar_plain
@@ -290,7 +290,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L290
         scalar: 'some scalar',
         style: Psych::Nodes::Scalar::PLAIN,
         tag: nil
-      assert_match /\A--- some scalar\n(?:\.\.\.\n)?\z/, foo
+      assert_match(/\A--- some scalar\n(?:\.\.\.\n)?\z/, foo)
     end
 
     def test_coder_style_scalar_single_quoted
-- 
cgit v1.1


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

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