Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
URI.parser=
parser=(parser = RFC3986_PARSER)
lib/uri/common.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/uri/common.rb, line 25
def self.parser=(parser = RFC3986_PARSER)
remove_const(:Parser) if defined?(::URI::Parser)
const_set("Parser", parser.class)
remove_const(:REGEXP) if defined?(::URI::REGEXP)
remove_const(:PATTERN) if defined?(::URI::PATTERN)
if Parser == RFC2396_Parser
const_set("REGEXP", URI::RFC2396_REGEXP)
const_set("PATTERN", URI::RFC2396_REGEXP::PATTERN)
end
Parser.new.regexp.each_pair do |sym, str|
remove_const(sym) if const_defined?(sym, false)
const_set(sym, str)
end
end
No documentation available