aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre ZANNI <16578570+noraj@users.noreply.github.com>2023-10-14 14:16:13 +0200
committergit <svn-admin@ruby-lang.org>2023-10-14 16:46:14 +0000
commit7865cebfb7a113ed87409a41424c4fd617dee67c (patch)
tree53b05d2078dbb02d2ff0cff978d62fa6dacb0282
parent75fb3cf458fe41b2c935f54b9e5734ced3dc0ece (diff)
downloadruby-7865cebfb7a113ed87409a41424c4fd617dee67c.tar.gz
[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
-rw-r--r--lib/cgi/util.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cgi/util.rb b/lib/cgi/util.rb
index 5f335898dc..8b129a44a5 100644
--- a/lib/cgi/util.rb
+++ b/lib/cgi/util.rb
@@ -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