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

ruby-changes:66166

From: Hiroshi <ko1@a...>
Date: Wed, 12 May 2021 17:25:08 +0900 (JST)
Subject: [ruby-changes:66166] 183174475c (master): [rubygems/rubygems] Use Regexp with refute_match

https://git.ruby-lang.org/ruby.git/commit/?id=183174475c

From 183174475c9cd51148f72668605390912339bcef Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Wed, 19 Feb 2020 15:10:29 +0900
Subject: [rubygems/rubygems] Use Regexp with refute_match

https://github.com/rubygems/rubygems/commit/51fdbe53bc
---
 test/rubygems/test_gem_commands_help_command.rb | 2 +-
 test/rubygems/test_gem_specification.rb         | 2 +-
 test/rubygems/test_remote_fetch_error.rb        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/rubygems/test_gem_commands_help_command.rb b/test/rubygems/test_gem_commands_help_command.rb
index 8d20563..b85c6fb 100644
--- a/test/rubygems/test_gem_commands_help_command.rb
+++ b/test/rubygems/test_gem_commands_help_command.rb
@@ -48,7 +48,7 @@ class TestGemCommandsHelpCommand < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_help_command.rb#L48
       if Gem::HAVE_OPENSSL
         assert_empty err
 
-        refute_match 'No command found for ', out
+        refute_match %r|No command found for |, out
       end
     end
   end
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 0f895e3..42988ad 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -2619,7 +2619,7 @@ end https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L2619
   def test_to_yaml
     yaml_str = @a1.to_yaml
 
-    refute_match '!!null', yaml_str
+    refute_match %r|!!null|, yaml_str
 
     same_spec = Gem::Specification.from_yaml(yaml_str)
 
diff --git a/test/rubygems/test_remote_fetch_error.rb b/test/rubygems/test_remote_fetch_error.rb
index 29aaaa8..6602f82 100644
--- a/test/rubygems/test_remote_fetch_error.rb
+++ b/test/rubygems/test_remote_fetch_error.rb
@@ -4,7 +4,7 @@ require 'rubygems/test_case' https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_remote_fetch_error.rb#L4
 class TestRemoteFetchError < Gem::TestCase
   def test_password_redacted
     error = Gem::RemoteFetcher::FetchError.new('There was an error fetching', 'https://user:secret@g...')
-    refute_match 'secret', error.to_s
+    refute_match %r|secret|, error.to_s
   end
 
   def test_invalid_url
-- 
cgit v1.1


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

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