aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJoshua Ballanco <joshua.ballanco@patch.com>2011-04-14 23:18:12 -0400
committerJoshua Ballanco <joshua.ballanco@patch.com>2011-04-14 23:18:12 -0400
commitc09538941fad7929955ada73cc796e918af415ca (patch)
tree82499b0aed0897a304f19b119f9a909726c650d6 /actionpack/test
parent93641ed6c8c684f6b4db02b6c8a22fa9bc7f0eaf (diff)
downloadrails-c09538941fad7929955ada73cc796e918af415ca.tar.gz
rails-c09538941fad7929955ada73cc796e918af415ca.tar.bz2
rails-c09538941fad7929955ada73cc796e918af415ca.zip
Test for stripping tags from a frozen string.
This test will pass under Ruby 1.8 but fail under Ruby 1.9 because of the change in behavior of gsub! w.r.t. frozen strings that do not match the pattern used [ruby-core:23664].
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/html-scanner/sanitizer_test.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/test/template/html-scanner/sanitizer_test.rb b/actionpack/test/template/html-scanner/sanitizer_test.rb
index fcc3782f04..678cb9eeeb 100644
--- a/actionpack/test/template/html-scanner/sanitizer_test.rb
+++ b/actionpack/test/template/html-scanner/sanitizer_test.rb
@@ -20,6 +20,7 @@ class SanitizerTest < ActionController::TestCase
assert_equal "This has a here.", sanitizer.sanitize("This has a <![CDATA[<section>]]> here.")
assert_equal "This has an unclosed ", sanitizer.sanitize("This has an unclosed <![CDATA[<section>]] here...")
[nil, '', ' '].each { |blank| assert_equal blank, sanitizer.sanitize(blank) }
+ assert_nothing_raised { sanitizer.sanitize("This is a frozen string with no tags".freeze) }
end
def test_strip_links