Skip to content

Commit

Permalink
URI::RFC2396_PARSER is not provided at old Ruby version
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Aug 8, 2024
1 parent 0cf6b84 commit f782db1
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::RFC2396_PARSER, escape: URI::RFC2396_PARSER.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
Expand Down

0 comments on commit f782db1

Please sign in to comment.