diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index c16588d88d..b99d24d281 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -219,9 +219,6 @@ module ActionView method_name = self.method_name if source.encoding_aware? - # Avoid performing in-place mutation for SafeBuffer - @source = source.to_str if source.html_safe? - # Look for # encoding: *. If we find one, we'll encode the # String in that encoding, otherwise, we'll use the # default external encoding. diff --git a/actionpack/test/template/template_test.rb b/actionpack/test/template/template_test.rb index 4d05fee1e3..81fb34b80f 100644 --- a/actionpack/test/template/template_test.rb +++ b/actionpack/test/template/template_test.rb @@ -173,10 +173,5 @@ class TestERBTemplate < ActiveSupport::TestCase ensure silence_warnings { Encoding.default_external = old } end - - def test_render_inline_safebuffer_should_not_raise_error - @template = new_template("Hello".html_safe) - render - end end end