Skip to content
This repository
Browse code

Revert "Make sure that we don't perform in-place mutation on SafeBuff…

…er string"

This reverts commit 104e200.
  • Loading branch information...
commit 0019379e55b9ba2983a513dcee6297298547ef04 1 parent 70b4ea9
authored June 10, 2011
3  actionpack/lib/action_view/template.rb
@@ -192,9 +192,6 @@ def compile(locals, view, mod)
192 192
         locals_code = locals.keys.map! { |key| "#{key} = local_assigns[:#{key}];" }.join
193 193
 
194 194
         if source.encoding_aware?
195  
-          # Avoid performing in-place mutation for SafeBuffer
196  
-          @source = source.to_str if source.html_safe?
197  
-
198 195
           # Look for # encoding: *. If we find one, we'll encode the
199 196
           # String in that encoding, otherwise, we'll use the
200 197
           # default external encoding.
5  actionpack/test/template/template_test.rb
@@ -128,10 +128,5 @@ def with_external_encoding(encoding)
128 128
     ensure
129 129
       Encoding.default_external = old
130 130
     end
131  
-
132  
-    def test_render_inline_safebuffer_should_not_raise_error
133  
-      @template = new_template("Hello".html_safe)
134  
-      render
135  
-    end
136 131
   end
137 132
 end

0 notes on commit 0019379

Please sign in to comment.
Something went wrong with that request. Please try again.