1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix Regexp warnings in lib/uri. Patch #16524 by Kornelius Kalnbach.

[ruby-core:14302]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2007-12-24 01:51:49 +00:00
parent d0c819cf94
commit a350a39c97
3 changed files with 23 additions and 19 deletions

View file

@ -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@segment7.net>
* gem_prelude.rb: Remove methods from Gem, not QuickLoader, to fix

View file

@ -186,31 +186,30 @@ module URI
# 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

View file

@ -55,7 +55,7 @@ module URI
(#{PATTERN::FRAGMENT}) (?# 3: fragment)
)?
\\z
", Regexp::EXTENDED, 'N').freeze
", Regexp::EXTENDED).freeze
# :startdoc:
#