summaryrefslogtreecommitdiff
path: root/lib/rubygems
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2024-12-11 19:25:45 +0100
committerHiroshi SHIBATA <[email protected]>2024-12-13 11:29:34 +0900
commit71bebcf6586fd7ab58bd8c65df98852ccfba8282 (patch)
tree40c672d2b74f21b8d325a9e90abc0b5e61ffacc8 /lib/rubygems
parent57f222c182de3593463816e31b1379867ec9ebc1 (diff)
Bump vendored uri to 1.0.2
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/vendor/uri/lib/uri/common.rb7
-rw-r--r--lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb7
-rw-r--r--lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb8
-rw-r--r--lib/rubygems/vendor/uri/lib/uri/version.rb2
4 files changed, 13 insertions, 11 deletions
diff --git a/lib/rubygems/vendor/uri/lib/uri/common.rb b/lib/rubygems/vendor/uri/lib/uri/common.rb
index 37c5c80270..4d2f78db84 100644
--- a/lib/rubygems/vendor/uri/lib/uri/common.rb
+++ b/lib/rubygems/vendor/uri/lib/uri/common.rb
@@ -31,15 +31,10 @@ module Gem::URI
if Parser == RFC2396_Parser
const_set("REGEXP", Gem::URI::RFC2396_REGEXP)
const_set("PATTERN", Gem::URI::RFC2396_REGEXP::PATTERN)
- Parser.new.pattern.each_pair do |sym, str|
- unless REGEXP::PATTERN.const_defined?(sym)
- REGEXP::PATTERN.const_set(sym, str)
- end
- end
end
Parser.new.regexp.each_pair do |sym, str|
- remove_const(sym) if const_defined?(sym)
+ remove_const(sym) if const_defined?(sym, false)
const_set(sym, str)
end
end
diff --git a/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb b/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb
index d222bdc438..a9b326e6b0 100644
--- a/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb
+++ b/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb
@@ -536,4 +536,11 @@ module Gem::URI
end
end # class Parser
+
+ # Backward compatibility for Gem::URI::REGEXP::PATTERN::*
+ RFC2396_Parser.new.pattern.each_pair do |sym, str|
+ unless RFC2396_REGEXP::PATTERN.const_defined?(sym, false)
+ RFC2396_REGEXP::PATTERN.const_set(sym, str)
+ end
+ end
end # module Gem::URI
diff --git a/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb b/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb
index 53dec866c2..3b6961abf6 100644
--- a/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb
+++ b/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb
@@ -142,25 +142,25 @@ module Gem::URI
# Compatibility for RFC2396 parser
def extract(str, schemes = nil, &block) # :nodoc:
- warn "Gem::URI::RFC3986_PARSER.extract is obsoleted. Use Gem::URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE
+ warn "Gem::URI::RFC3986_PARSER.extract is obsolete. Use Gem::URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE
RFC2396_PARSER.extract(str, schemes, &block)
end
# Compatibility for RFC2396 parser
def make_regexp(schemes = nil) # :nodoc:
- warn "Gem::URI::RFC3986_PARSER.make_regexp is obsoleted. Use Gem::URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE
+ warn "Gem::URI::RFC3986_PARSER.make_regexp is obsolete. Use Gem::URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE
RFC2396_PARSER.make_regexp(schemes)
end
# Compatibility for RFC2396 parser
def escape(str, unsafe = nil) # :nodoc:
- warn "Gem::URI::RFC3986_PARSER.escape is obsoleted. Use Gem::URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE
+ warn "Gem::URI::RFC3986_PARSER.escape is obsolete. Use Gem::URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE
unsafe ? RFC2396_PARSER.escape(str, unsafe) : RFC2396_PARSER.escape(str)
end
# Compatibility for RFC2396 parser
def unescape(str, escaped = nil) # :nodoc:
- warn "Gem::URI::RFC3986_PARSER.unescape is obsoleted. Use Gem::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
+ warn "Gem::URI::RFC3986_PARSER.unescape is obsolete. Use Gem::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
escaped ? RFC2396_PARSER.unescape(str, escaped) : RFC2396_PARSER.unescape(str)
end
diff --git a/lib/rubygems/vendor/uri/lib/uri/version.rb b/lib/rubygems/vendor/uri/lib/uri/version.rb
index ce9ab59580..72268badfd 100644
--- a/lib/rubygems/vendor/uri/lib/uri/version.rb
+++ b/lib/rubygems/vendor/uri/lib/uri/version.rb
@@ -1,6 +1,6 @@
module Gem::URI
# :stopdoc:
- VERSION_CODE = '010001'.freeze
+ VERSION_CODE = '010002'.freeze
VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
# :startdoc:
end