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

ruby-changes:3073

From: ko1@a...
Date: 24 Dec 2007 10:52:01 +0900
Subject: [ruby-changes:3073] drbrain - Ruby:r14565 (trunk): Fix Regexp warnings in lib/uri. Patch #16524 by Kornelius Kalnbach.

drbrain	2007-12-24 10:51:49 +0900 (Mon, 24 Dec 2007)

  New Revision: 14565

  Modified files:
    trunk/ChangeLog
    trunk/lib/uri/common.rb
    trunk/lib/uri/mailto.rb

  Log:
    Fix Regexp warnings in lib/uri.  Patch #16524 by Kornelius Kalnbach.
    [ruby-core:14302]


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14565&r2=14564
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/uri/mailto.rb?r1=14565&r2=14564
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/uri/common.rb?r1=14565&r2=14564

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14564)
+++ ChangeLog	(revision 14565)
@@ -1,3 +1,8 @@
+Mon Dec 24 10:49:04 2007
+
+	* lib/uri/mailto.rb, lib/uri/common.rb:  Fix Regexp warnings.  Patch
+	#16524 from Kornelius Kalnbach, [ruby-core:14302].
+
 Mon Dec 24 10:37:38 2007  Eric Hodel  <drbrain@s...>
 
 	* gem_prelude.rb:  Remove methods from Gem, not QuickLoader, to fix
Index: lib/uri/mailto.rb
===================================================================
--- lib/uri/mailto.rb	(revision 14564)
+++ lib/uri/mailto.rb	(revision 14565)
@@ -55,7 +55,7 @@
         (#{PATTERN::FRAGMENT})                        (?# 3: fragment)
       )?
       \\z
-    ", Regexp::EXTENDED, 'N').freeze
+    ", Regexp::EXTENDED).freeze
     # :startdoc:
 
     #
Index: lib/uri/common.rb
===================================================================
--- lib/uri/common.rb	(revision 14564)
+++ lib/uri/common.rb	(revision 14565)
@@ -186,31 +186,30 @@
 
     # for URI::split
     ABS_URI = Regexp.new('^' + PATTERN::X_ABS_URI + '$', #'
-                         Regexp::EXTENDED, 'N').freeze
+                         Regexp::EXTENDED).freeze
     REL_URI = Regexp.new('^' + PATTERN::X_REL_URI + '$', #'
-                         Regexp::EXTENDED, 'N').freeze
+                         Regexp::EXTENDED).freeze
 
     # for URI::extract
-    URI_REF     = Regexp.new(PATTERN::URI_REF, false, 'N').freeze
-    ABS_URI_REF = Regexp.new(PATTERN::X_ABS_URI, Regexp::EXTENDED, 'N').freeze
-    REL_URI_REF = Regexp.new(PATTERN::X_REL_URI, Regexp::EXTENDED, 'N').freeze
+    URI_REF     = Regexp.new(PATTERN::URI_REF).freeze
+    ABS_URI_REF = Regexp.new(PATTERN::X_ABS_URI, Regexp::EXTENDED).freeze
+    REL_URI_REF = Regexp.new(PATTERN::X_REL_URI, Regexp::EXTENDED).freeze
 
     # for URI::escape/unescape
-    ESCAPED = Regexp.new(PATTERN::ESCAPED, false, 'N').freeze
-    UNSAFE  = Regexp.new("[^#{PATTERN::UNRESERVED}#{PATTERN::RESERVED}]",
-                         false, 'N').freeze
+    ESCAPED = Regexp.new(PATTERN::ESCAPED).freeze
+    UNSAFE  = Regexp.new("[^#{PATTERN::UNRESERVED}#{PATTERN::RESERVED}]").freeze
 
     # for Generic#initialize
-    SCHEME   = Regexp.new("^#{PATTERN::SCHEME}$", false, 'N').freeze #"
-    USERINFO = Regexp.new("^#{PATTERN::USERINFO}$", false, 'N').freeze #"
-    HOST     = Regexp.new("^#{PATTERN::HOST}$", false, 'N').freeze #"
-    PORT     = Regexp.new("^#{PATTERN::PORT}$", false, 'N').freeze #"
-    OPAQUE   = Regexp.new("^#{PATTERN::OPAQUE_PART}$", false, 'N').freeze #"
-    REGISTRY = Regexp.new("^#{PATTERN::REG_NAME}$", false, 'N').freeze #"
-    ABS_PATH = Regexp.new("^#{PATTERN::ABS_PATH}$", false, 'N').freeze #"
-    REL_PATH = Regexp.new("^#{PATTERN::REL_PATH}$", false, 'N').freeze #"
-    QUERY    = Regexp.new("^#{PATTERN::QUERY}$", false, 'N').freeze #"
-    FRAGMENT = Regexp.new("^#{PATTERN::FRAGMENT}$", false, 'N').freeze #"
+    SCHEME   = Regexp.new("^#{PATTERN::SCHEME}$").freeze #"
+    USERINFO = Regexp.new("^#{PATTERN::USERINFO}$").freeze #"
+    HOST     = Regexp.new("^#{PATTERN::HOST}$").freeze #"
+    PORT     = Regexp.new("^#{PATTERN::PORT}$").freeze #"
+    OPAQUE   = Regexp.new("^#{PATTERN::OPAQUE_PART}$").freeze #"
+    REGISTRY = Regexp.new("^#{PATTERN::REG_NAME}$").freeze #"
+    ABS_PATH = Regexp.new("^#{PATTERN::ABS_PATH}$").freeze #"
+    REL_PATH = Regexp.new("^#{PATTERN::REL_PATH}$").freeze #"
+    QUERY    = Regexp.new("^#{PATTERN::QUERY}$").freeze #"
+    FRAGMENT = Regexp.new("^#{PATTERN::FRAGMENT}$").freeze #"
     # :startdoc:
   end # REGEXP
 

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

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