[ruby/cgi] doc: fix method name
there was probably a copy paste mistake in the example of unescapeURIComponent (copied from unescape) https://github.com/ruby/cgi/commit/f8fb627e90
This commit is contained in:
parent
75fb3cf458
commit
7865cebfb7
@ -36,7 +36,7 @@ module CGI::Util
|
|||||||
|
|
||||||
# URL-encode a string following RFC 3986
|
# URL-encode a string following RFC 3986
|
||||||
# Space characters (+" "+) are encoded with (+"%20"+)
|
# Space characters (+" "+) are encoded with (+"%20"+)
|
||||||
# url_encoded_string = CGI.escape("'Stop!' said Fred")
|
# url_encoded_string = CGI.escapeURIComponent("'Stop!' said Fred")
|
||||||
# # => "%27Stop%21%27%20said%20Fred"
|
# # => "%27Stop%21%27%20said%20Fred"
|
||||||
def escapeURIComponent(string)
|
def escapeURIComponent(string)
|
||||||
encoding = string.encoding
|
encoding = string.encoding
|
||||||
@ -48,7 +48,7 @@ module CGI::Util
|
|||||||
end
|
end
|
||||||
|
|
||||||
# URL-decode a string following RFC 3986 with encoding(optional).
|
# URL-decode a string following RFC 3986 with encoding(optional).
|
||||||
# string = CGI.unescape("%27Stop%21%27+said%20Fred")
|
# string = CGI.unescapeURIComponent("%27Stop%21%27+said%20Fred")
|
||||||
# # => "'Stop!'+said Fred"
|
# # => "'Stop!'+said Fred"
|
||||||
def unescapeURIComponent(string, encoding = @@accept_charset)
|
def unescapeURIComponent(string, encoding = @@accept_charset)
|
||||||
str = string.b
|
str = string.b
|
||||||
|
Loading…
x
Reference in New Issue
Block a user