mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert "Make sure that we don't perform in-place mutation on SafeBuffer string"
This reverts commit 115e80dccc
.
This commit is contained in:
parent
adef9764ae
commit
94df84a8a4
2 changed files with 0 additions and 8 deletions
|
@ -218,9 +218,6 @@ module ActionView
|
||||||
method_name = self.method_name
|
method_name = self.method_name
|
||||||
|
|
||||||
if source.encoding_aware?
|
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
|
# Look for # encoding: *. If we find one, we'll encode the
|
||||||
# String in that encoding, otherwise, we'll use the
|
# String in that encoding, otherwise, we'll use the
|
||||||
# default external encoding.
|
# default external encoding.
|
||||||
|
|
|
@ -172,10 +172,5 @@ class TestERBTemplate < ActiveSupport::TestCase
|
||||||
ensure
|
ensure
|
||||||
silence_warnings { Encoding.default_external = old }
|
silence_warnings { Encoding.default_external = old }
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_render_inline_safebuffer_should_not_raise_error
|
|
||||||
@template = new_template("Hello".html_safe)
|
|
||||||
render
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue