diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/safe_buffer_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activesupport/test/safe_buffer_test.rb b/activesupport/test/safe_buffer_test.rb index efa9d5e61f..fca4b45276 100644 --- a/activesupport/test/safe_buffer_test.rb +++ b/activesupport/test/safe_buffer_test.rb @@ -165,4 +165,13 @@ class SafeBufferTest < ActiveSupport::TestCase x = 'foo %{x} bar'.html_safe % { x: 'qux' } assert x.html_safe?, 'should be safe' end + + test 'Should not affect frozen objects when accessing characters' do + x = 'Hello'.html_safe + assert_nothing_raised do + x[/a/, 1] + end + end + + end |