summaryrefslogtreecommitdiff
path: root/lib/cgi
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-20 08:33:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-20 08:33:33 +0000
commit20cd25c86fd28eb1b5068d0db607e6aa33107f65 (patch)
treecd5ddf4f9592ba06dc6fe2ad7144459d09de3241 /lib/cgi
parent86b1179a03791002b6428f5b49754d7411933e9e (diff)
cgi/util.rb: remove CGI::Util#_unescape
* ext/cgi/escape/escape.c (cgiesc_unescape): define unescape method instead of _unescape, and should pass the optional argument to the super method. * lib/cgi/util.rb (CGI::Util#_unescape): remove intermediate method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi')
-rw-r--r--lib/cgi/util.rb4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/cgi/util.rb b/lib/cgi/util.rb
index 7968c9326e9..d2657ab9810 100644
--- a/lib/cgi/util.rb
+++ b/lib/cgi/util.rb
@@ -16,10 +16,6 @@ module CGI::Util
# string = CGI::unescape("%27Stop%21%27+said+Fred")
# # => "'Stop!' said Fred"
def unescape(string,encoding=@@accept_charset)
- _unescape(string,encoding)
- end
-
- private def _unescape(string, encoding)
str=string.tr('+', ' ').b.gsub(/((?:%[0-9a-fA-F]{2})+)/) do |m|
[m.delete('%')].pack('H*')
end.force_encoding(encoding)