From 07a52e9182e4b83183c9935599daf004df5e05bc Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 21 Oct 2023 20:16:24 +0900 Subject: [PATCH 1/2] Suppress already initialized constant warnings --- test/stdlib/ARGF_test.rb | 2 +- test/stdlib/constants_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/stdlib/ARGF_test.rb b/test/stdlib/ARGF_test.rb index 33eb45995..fe7c454cd 100644 --- a/test/stdlib/ARGF_test.rb +++ b/test/stdlib/ARGF_test.rb @@ -4,7 +4,7 @@ # initialize temporary class module RBS module Unnamed - ARGFClass = ARGF.class + ARGFClass ||= ARGF.class end end diff --git a/test/stdlib/constants_test.rb b/test/stdlib/constants_test.rb index 0792d9de8..097731502 100644 --- a/test/stdlib/constants_test.rb +++ b/test/stdlib/constants_test.rb @@ -3,7 +3,7 @@ # initialize temporary class module RBS module Unnamed - ARGFClass = ARGF.class + ARGFClass ||= ARGF.class end end From 2f8ecc51917efed1020b945fbc193902c91869a6 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 21 Oct 2023 20:17:16 +0900 Subject: [PATCH 2/2] Suppress warning: ambiguity between regexp and two divisions --- test/rbs/cli_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/rbs/cli_test.rb b/test/rbs/cli_test.rb index 3fc2ce608..4fe9e1348 100644 --- a/test/rbs/cli_test.rb +++ b/test/rbs/cli_test.rb @@ -435,7 +435,7 @@ class Foo error = assert_raises RuntimeError do cli.run(["-I", dir, "validate"]) end - assert_match /void|self|instance|class/, error.message + assert_match(/void|self|instance|class/, error.message) end end end