diff options
Diffstat (limited to 'lib/uri/common.rb')
-rw-r--r-- | lib/uri/common.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb index e31e0abcc0..904df10663 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -45,6 +45,15 @@ module URI end self.parser = RFC3986_PARSER + def self.const_missing(const) + if value = RFC2396_PARSER.regexp[const] + warn "URI::#{const} is obsolete. Use RFC2396_PARSER.regexp[#{const.inspect}] explicitly.", uplevel: 1 if $VERBOSE + value + else + super + end + end + module Util # :nodoc: def make_components_hash(klass, array_hash) tmp = {} |