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

ruby-changes:63194

From: Yusuke <ko1@a...>
Date: Tue, 29 Sep 2020 11:59:04 +0900 (JST)
Subject: [ruby-changes:63194] 40a499db65 (master): test/racc/test_racc_command.rb: prevent a warning

https://git.ruby-lang.org/ruby.git/commit/?id=40a499db65

From 40a499db65c3ef07cab2c1d7113328ef9dd40b09 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Tue, 29 Sep 2020 11:58:04 +0900
Subject: test/racc/test_racc_command.rb: prevent a warning

http://rubyci.s3.amazonaws.com/ubuntu2004/ruby-master/log/20200929T003003Z.log.html.gz
```
warning: ambiguous first argument; put parentheses or a space even after `/' operator
```

diff --git a/test/racc/test_racc_command.rb b/test/racc/test_racc_command.rb
index f1116a3..fb00ce7 100644
--- a/test/racc/test_racc_command.rb
+++ b/test/racc/test_racc_command.rb
@@ -322,7 +322,7 @@ module Racc https://github.com/ruby/ruby/blob/trunk/test/racc/test_racc_command.rb#L322
     def test_ifelse
       stderr = nil
       racc "-o#{@TAB_DIR}/ifelse", "#{ASSET_DIR}/ifelse.y", stdout_filter: ->(s) { stderr = s }
-      stderr = stderr.lines[1..-1].join if RUBY_PLATFORM.match? /java/
+      stderr = stderr.lines[1..-1].join if RUBY_PLATFORM.match?(/java/)
       assert_equal(<<~STDERR, stderr)
         1 useless nonterminals:
           dummy
-- 
cgit v0.10.2


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

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