Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
URI._decode_uri_component
_decode_uri_component(regexp, str, enc)
lib/uri/common.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/uri/common.rb, line 463
def self._decode_uri_component(regexp, str, enc)
raise ArgumentError, "invalid %-encoding (#{str})" if /%(?!\h\h)/.match?(str)
str.b.gsub(regexp, TBLDECWWWCOMP_).force_encoding(enc)
end
Returns a string decoding characters matching regexp from the given URL-encoded string str.