diff options
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/output_safety.rb | 6 | ||||
-rw-r--r-- | activesupport/test/safe_buffer_test.rb | 6 |
2 files changed, 0 insertions, 12 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb index 5b39fd6a6a..e3fa528efb 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -98,12 +98,6 @@ module ActiveSupport #:nodoc: end end - def[](*args) - new_safe_buffer = super - new_safe_buffer.instance_eval { @dirty = false } - new_safe_buffer - end - def safe_concat(value) raise SafeConcatError if dirty? original_concat(value) diff --git a/activesupport/test/safe_buffer_test.rb b/activesupport/test/safe_buffer_test.rb index 20731218cf..e731f1c2e7 100644 --- a/activesupport/test/safe_buffer_test.rb +++ b/activesupport/test/safe_buffer_test.rb @@ -111,12 +111,6 @@ class SafeBufferTest < ActiveSupport::TestCase assert_kind_of NilClass, @buffer.slice("chipchop") end - test "Should initialize @dirty to false for new instance when sliced" do - dirty = @buffer[0,0].send(:dirty?) - assert_not_nil dirty - assert !dirty - end - test "clone_empty returns an empty buffer" do assert_equal '', ActiveSupport::SafeBuffer.new('foo').clone_empty end |