From 0019379e55b9ba2983a513dcee6297298547ef04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Pastorino=20and=20Jos=C3=A9=20Ignacio=20Costa?= Date: Fri, 10 Jun 2011 23:11:13 -0300 Subject: [PATCH] Revert "Make sure that we don't perform in-place mutation on SafeBuffer string" This reverts commit 104e200a5e60908be144e7bba5b90725f1a115e0. --- actionpack/lib/action_view/template.rb | 3 --- actionpack/test/template/template_test.rb | 5 ----- 2 files changed, 8 deletions(-) diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index d0269fc9d1836..313418ae9689b 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -192,9 +192,6 @@ def compile(locals, view, mod) locals_code = locals.keys.map! { |key| "#{key} = local_assigns[:#{key}];" }.join 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 ded2fcdf338a3..fbc9350c69431 100644 --- a/actionpack/test/template/template_test.rb +++ b/actionpack/test/template/template_test.rb @@ -128,10 +128,5 @@ def with_external_encoding(encoding) ensure Encoding.default_external = old end - - def test_render_inline_safebuffer_should_not_raise_error - @template = new_template("Hello".html_safe) - render - end end end