Skip to content

Commit

Permalink
Revert "Make sure that we don't perform in-place mutation on SafeBuff…
Browse files Browse the repository at this point in the history
…er string"

This reverts commit 104e200.
  • Loading branch information
Santiago Pastorino and José Ignacio Costa committed Jun 11, 2011
1 parent 70b4ea9 commit 0019379
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
3 changes: 0 additions & 3 deletions actionpack/lib/action_view/template.rb
Expand Up @@ -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.
Expand Down
5 changes: 0 additions & 5 deletions actionpack/test/template/template_test.rb
Expand Up @@ -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

0 comments on commit 0019379

Please sign in to comment.