Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 333d874 commit 158f58aCopy full SHA for 158f58a
lib/uri/common.rb
@@ -397,7 +397,7 @@ def self.encode_www_form_component(str, enc=nil)
397
#
398
# See URI.encode_www_form_component, URI.decode_www_form.
399
def self.decode_www_form_component(str, enc=Encoding::UTF_8)
400
- raise ArgumentError, "invalid %-encoding (#{str})" if /%(?!\h\h)/ =~ str
+ raise ArgumentError, "invalid %-encoding (#{str})" if /%(?!\h\h)/.match?(str)
401
str.b.gsub(/\+|%\h\h/, TBLDECWWWCOMP_).force_encoding(enc)
402
end
403
0 commit comments