diff --git a/mustermann/lib/mustermann/ast/translator.rb b/mustermann/lib/mustermann/ast/translator.rb index 505dec0..33b8a7d 100644 --- a/mustermann/lib/mustermann/ast/translator.rb +++ b/mustermann/lib/mustermann/ast/translator.rb @@ -118,7 +118,7 @@ def decorator_for(node) # @return [String] escaped character # @!visibility private - def escape(char, parser: URI::DEFAULT_PARSER, escape: URI::RFC2396_Parser.new.regexp[:UNSAFE], also_escape: nil) + def escape(char, parser: URI::RFC2396_Parser.new, escape: URI::RFC2396_Parser.new.regexp[:UNSAFE], also_escape: nil) escape = Regexp.union(also_escape, escape) if also_escape char.to_s =~ escape ? parser.escape(char, Regexp.union(*escape)) : char end diff --git a/mustermann/lib/mustermann/pattern.rb b/mustermann/lib/mustermann/pattern.rb index cc15187..f9ecd01 100644 --- a/mustermann/lib/mustermann/pattern.rb +++ b/mustermann/lib/mustermann/pattern.rb @@ -9,7 +9,7 @@ module Mustermann # @abstract class Pattern include Mustermann - @@uri ||= URI::Parser.new + @@uri ||= URI::RFC2396_Parser.new # List of supported options. #