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

ruby-changes:50322

From: nagachika <ko1@a...>
Date: Sat, 17 Feb 2018 01:04:28 +0900 (JST)
Subject: [ruby-changes:50322] nagachika:r62436 (trunk): fix regexp literal warning.

nagachika	2018-02-17 01:04:21 +0900 (Sat, 17 Feb 2018)

  New Revision: 62436

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62436

  Log:
    fix regexp literal warning.
    
    test/rubygems/test_gem_server.rb: eliminate duplicated character class warning.
    [Bug #14481]

  Modified files:
    trunk/test/rubygems/test_gem_server.rb
Index: test/rubygems/test_gem_server.rb
===================================================================
--- test/rubygems/test_gem_server.rb	(revision 62435)
+++ test/rubygems/test_gem_server.rb	(revision 62436)
@@ -405,7 +405,7 @@ class TestGemServer < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_server.rb#L405
     #
     #
     #  <a href="." title=".">[www]</a>
-    regex_match = /xsshomepagegem 1<\/b>[\n\s]+(<span title="rdoc not installed">\[rdoc\]<\/span>|<a href="\/doc_root\/xsshomepagegem-1\/">\[rdoc\]<\/a>)[\n\s]+<a href="\." title="\.">\[www\]<\/a>/
+    regex_match = /xsshomepagegem 1<\/b>[\s]+(<span title="rdoc not installed">\[rdoc\]<\/span>|<a href="\/doc_root\/xsshomepagegem-1\/">\[rdoc\]<\/a>)[\s]+<a href="\." title="\.">\[www\]<\/a>/
     assert_match regex_match, @res.body
   end
 
@@ -460,7 +460,7 @@ class TestGemServer < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_server.rb#L460
     #
     #
     #  <a href="." title=".">[www]</a>
-    regex_match = /invalidhomepagegem 1<\/b>[\n\s]+(<span title="rdoc not installed">\[rdoc\]<\/span>|<a href="\/doc_root\/invalidhomepagegem-1\/">\[rdoc\]<\/a>)[\n\s]+<a href="\." title="\.">\[www\]<\/a>/
+    regex_match = /invalidhomepagegem 1<\/b>[\s]+(<span title="rdoc not installed">\[rdoc\]<\/span>|<a href="\/doc_root\/invalidhomepagegem-1\/">\[rdoc\]<\/a>)[\s]+<a href="\." title="\.">\[www\]<\/a>/
     assert_match regex_match, @res.body
   end
 
@@ -487,7 +487,7 @@ class TestGemServer < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_server.rb#L487
     assert_equal 200, @res.status
     assert_match 'validhomepagegemhttp 1', @res.body
 
-    regex_match = /validhomepagegemhttp 1<\/b>[\n\s]+(<span title="rdoc not installed">\[rdoc\]<\/span>|<a href="\/doc_root\/validhomepagegemhttp-1\/">\[rdoc\]<\/a>)[\n\s]+<a href="http:\/\/rubygems\.org" title="http:\/\/rubygems\.org">\[www\]<\/a>/
+    regex_match = /validhomepagegemhttp 1<\/b>[\s]+(<span title="rdoc not installed">\[rdoc\]<\/span>|<a href="\/doc_root\/validhomepagegemhttp-1\/">\[rdoc\]<\/a>)[\s]+<a href="http:\/\/rubygems\.org" title="http:\/\/rubygems\.org">\[www\]<\/a>/
     assert_match regex_match, @res.body
   end
 
@@ -514,7 +514,7 @@ class TestGemServer < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_server.rb#L514
     assert_equal 200, @res.status
     assert_match 'validhomepagegemhttps 1', @res.body
 
-    regex_match = /validhomepagegemhttps 1<\/b>[\n\s]+(<span title="rdoc not installed">\[rdoc\]<\/span>|<a href="\/doc_root\/validhomepagegemhttps-1\/">\[rdoc\]<\/a>)[\n\s]+<a href="https:\/\/rubygems\.org" title="https:\/\/rubygems\.org">\[www\]<\/a>/
+    regex_match = /validhomepagegemhttps 1<\/b>[\s]+(<span title="rdoc not installed">\[rdoc\]<\/span>|<a href="\/doc_root\/validhomepagegemhttps-1\/">\[rdoc\]<\/a>)[\s]+<a href="https:\/\/rubygems\.org" title="https:\/\/rubygems\.org">\[www\]<\/a>/
     assert_match regex_match, @res.body
   end
 

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

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