Returns a string decoded from the given URL-encoded string str
.
The given string is first encoded as Encoding::ASCII-8BIT (using String#b
), then decoded (as below), and finally force-encoded to the given encoding enc
.
The returned string:
Preserves:
Characters '*'
, '.'
, '-'
, and '_'
.
Character in ranges 'a'..'z'
, 'A'..'Z'
, and '0'..'9'
.
Example:
URI.decode_www_form_component('*.-_azAZ09') # => "*.-_azAZ09"
Converts:
Character '+'
to character ' '
.
Each “percent notation” to an ASCII character.
Example:
URI.decode_www_form_component('Here+are+some+punctuation+characters%3A+%2C%3B%3F%3A') # => "Here are some punctuation characters: ,;?:"
Related: URI.decode_uri_component
(preserves '+'
).
def foo(bar: baz); end
^^^^^^^^
def foo(bar: baz); end
^^^^^^^^
@foo &&= bar
becomes
@foo && @foo = bar
@foo ||= bar
becomes
@foo || @foo = bar
@foo += bar
becomes
@foo = @foo + bar
Full name of the tar entry
@foo = 1 ^^^^^^^^
@foo, = bar ^^^^
Visit the targets of a multi-target node.
foo, bar = baz ^^^^^^^^
foo, bar = baz ^^^^^^^^^^^^^^
A shareable constant.
class << self; end ^^^^^^^^^^^^^^^^^^
__ENCODING__ ^^^^^^^^^^^^
foo, bar = baz ^^^^^^^^
foo, bar = baz ^^^^^^^^^^^^^^
A shareable constant.
class << self; end ^^^^^^^^^^^^^^^^^^
__ENCODING__ ^^^^^^^^^^^^
undef foo ^^^^^^^^^