diff --git a/lib/bundler/vendor/uri/lib/uri/common.rb b/lib/bundler/vendor/uri/lib/uri/common.rb index c7236fce98..7cf81d27f6 100644 --- a/lib/bundler/vendor/uri/lib/uri/common.rb +++ b/lib/bundler/vendor/uri/lib/uri/common.rb @@ -31,15 +31,10 @@ module Bundler::URI if Parser == RFC2396_Parser const_set("REGEXP", Bundler::URI::RFC2396_REGEXP) const_set("PATTERN", Bundler::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/bundler/vendor/uri/lib/uri/rfc2396_parser.rb b/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb index 0b7897d92a..c199f911c4 100644 --- a/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +++ b/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb @@ -536,4 +536,11 @@ module Bundler::URI end end # class Parser + + # Backward compatibility for Bundler::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 Bundler::URI diff --git a/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb b/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb index 7473adcb68..d1ff28df23 100644 --- a/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +++ b/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb @@ -142,25 +142,25 @@ module Bundler::URI # Compatibility for RFC2396 parser def extract(str, schemes = nil, &block) # :nodoc: - warn "Bundler::URI::RFC3986_PARSER.extract is obsoleted. Use Bundler::URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE + warn "Bundler::URI::RFC3986_PARSER.extract is obsolete. Use Bundler::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 "Bundler::URI::RFC3986_PARSER.make_regexp is obsoleted. Use Bundler::URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE + warn "Bundler::URI::RFC3986_PARSER.make_regexp is obsolete. Use Bundler::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 "Bundler::URI::RFC3986_PARSER.escape is obsoleted. Use Bundler::URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE + warn "Bundler::URI::RFC3986_PARSER.escape is obsolete. Use Bundler::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 "Bundler::URI::RFC3986_PARSER.unescape is obsoleted. Use Bundler::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE + warn "Bundler::URI::RFC3986_PARSER.unescape is obsolete. Use Bundler::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE escaped ? RFC2396_PARSER.unescape(str, escaped) : RFC2396_PARSER.unescape(str) end diff --git a/lib/bundler/vendor/uri/lib/uri/version.rb b/lib/bundler/vendor/uri/lib/uri/version.rb index ce236bdb30..4f4207f3d0 100644 --- a/lib/bundler/vendor/uri/lib/uri/version.rb +++ b/lib/bundler/vendor/uri/lib/uri/version.rb @@ -1,6 +1,6 @@ module Bundler::URI # :stopdoc: - VERSION_CODE = '010001'.freeze + VERSION_CODE = '010002'.freeze VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze # :startdoc: end 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 diff --git a/tool/bundler/vendor_gems.rb b/tool/bundler/vendor_gems.rb index 1c5b1bc7cc..88cfdd2eb3 100644 --- a/tool/bundler/vendor_gems.rb +++ b/tool/bundler/vendor_gems.rb @@ -14,4 +14,4 @@ gem "securerandom", "0.4.0" gem "timeout", "0.4.2" gem "thor", "1.3.2" gem "tsort", "0.2.0" -gem "uri", "1.0.1" +gem "uri", "1.0.2"