Skip to content

Commit

Permalink
Don't call URI::RFC2396_Parser.new again
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Aug 8, 2024
1 parent 448b8cd commit 0cf6b84
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.new.regexp[:UNSAFE], also_escape: nil)
def escape(char, parser: URI::RFC2396_PARSER, escape: URI::RFC2396_PARSER.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 0cf6b84

Please sign in to comment.