diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-03 01:24:09 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-03 01:24:09 +0000 |
commit | 0e32c7c10abb1080c88af76574bcc2aa25c78cd5 (patch) | |
tree | defcf5a858f08857f5dbe88117e0fbb95b7f63c5 /test/cgi/test_cgi_util.rb | |
parent | 9b6dec6cac17a507792add61247772ac76d23f48 (diff) |
Revert "ext/cgi/escape: preserve String subclass in result"
This reverts commit 6afea14043b0c0e603f26c89ae0d043f65852668 r63328
I misread the original bug report and got results flipped.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/cgi/test_cgi_util.rb')
-rw-r--r-- | test/cgi/test_cgi_util.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/test/cgi/test_cgi_util.rb b/test/cgi/test_cgi_util.rb index 786e6f18a3..f2f5575efb 100644 --- a/test/cgi/test_cgi_util.rb +++ b/test/cgi/test_cgi_util.rb @@ -197,25 +197,4 @@ class CGIUtilTest < Test::Unit::TestCase assert_equal('<BR><A HREF="url"></A>', unescape_element(escapeHTML('<BR><A HREF="url"></A>'), "A", "IMG")) assert_equal('<BR><A HREF="url"></A>', unescape_element(escapeHTML('<BR><A HREF="url"></A>'), ["A", "IMG"])) end - - def test_escape_string_subclass - sc = Class.new(String).freeze - str = sc.new('>') - msg = '[ruby-core:86847] [Bug #14732]' - assert_not_instance_of String, str - - html = escapeHTML(str) - assert_instance_of sc, html, msg - assert_equal '>', html - orig = unescapeHTML(html) - assert_instance_of sc, orig, msg - assert_equal '>', orig - - url = escape(str) - assert_instance_of sc, url, msg - assert_equal '%3E', url - orig = unescape(url) - assert_instance_of sc, orig, msg - assert_equal '>', orig - end end |