summaryrefslogtreecommitdiff
path: root/lib/cgi/util.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-21 21:46:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-21 21:46:17 +0000
commitaf1da410ca3d2433ac7dfb9052b3f698c8c1edb4 (patch)
treeb9cb0c870ee05c0844d387cdbb975b1891f54c6c /lib/cgi/util.rb
parent6ea03277b1454c52c38334530b75b2d67533451c (diff)
cgi/util.rb: use alias
* lib/cgi/util.rb (escape_html, unescape_html): make synonyms aliases instead of wrapper methods. * lib/cgi/util.rb (escape_element, unescape_element): ditto. [Fixes GH-573] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi/util.rb')
-rw-r--r--lib/cgi/util.rb16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/cgi/util.rb b/lib/cgi/util.rb
index 199e17bbbc..3d7db8f2c8 100644
--- a/lib/cgi/util.rb
+++ b/lib/cgi/util.rb
@@ -90,14 +90,10 @@ module CGI::Util
end
# Synonym for CGI::escapeHTML(str)
- def escape_html(str)
- escapeHTML(str)
- end
+ alias escape_html escapeHTML
# Synonym for CGI::unescapeHTML(str)
- def unescape_html(str)
- unescapeHTML(str)
- end
+ alias unescape_html unescapeHTML
# Escape only the tags of certain HTML elements in +string+.
#
@@ -144,14 +140,10 @@ module CGI::Util
end
# Synonym for CGI::escapeElement(str)
- def escape_element(str)
- escapeElement(str)
- end
+ alias escape_element escapeElement
# Synonym for CGI::unescapeElement(str)
- def unescape_element(str)
- unescapeElement(str)
- end
+ alias unescape_element unescapeElement
# Abbreviated day-of-week names specified by RFC 822
RFC822_DAYS = %w[ Sun Mon Tue Wed Thu Fri Sat ]