Skip to content

Commit

Permalink
Merge pull request #138 from hsbt/fix-uri-default-parser-change
Browse files Browse the repository at this point in the history
Use URI::RFC2396_Parser#regex explicitly.
  • Loading branch information
dentarg authored Jul 30, 2024
2 parents 56dc65e + 0ed6aa3 commit 0b8554b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mustermann/lib/mustermann/ast/translator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def decorator_for(node)

# @return [String] escaped character
# @!visibility private
def escape(char, parser: URI::DEFAULT_PARSER, escape: parser.regexp[:UNSAFE], also_escape: nil)
def escape(char, parser: URI::DEFAULT_PARSER, 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
Expand Down

0 comments on commit 0b8554b

Please sign in to comment.