提交 681d89f9 编写于 作者: C Carlos Antonio da Silva

Stop SafeBuffer#clone_empty from issuing warnings

Logic in clone_empty method was dealing with old @dirty variable, which
has changed by @html_safe in this commit:
https://github.com/rails/rails/commit/139963c99a955520db6373343662e55f4d16dcd1

This was issuing a "not initialized variable" warning - related to:
https://github.com/rails/rails/pull/5237

The logic applied by this method is already handled by the [] override,
so there is no need to reset the variable here.
上级 9078dba7
......@@ -131,9 +131,7 @@ def initialize_copy(other)
end
def clone_empty
new_safe_buffer = self[0, 0]
new_safe_buffer.instance_variable_set(:@dirty, @dirty)
new_safe_buffer
self[0, 0]
end
def concat(value)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册