[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:
Alexandre ZANNI 2023-10-14 14:16:13 +02:00 коммит произвёл git
Родитель 75fb3cf458
Коммит 7865cebfb7
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -36,7 +36,7 @@ module CGI::Util
# URL-encode a string following RFC 3986
# 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"
def escapeURIComponent(string)
encoding = string.encoding
@ -48,7 +48,7 @@ module CGI::Util
end
# 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"
def unescapeURIComponent(string, encoding = @@accept_charset)
str = string.b