Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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:
rails@139963c

This was issuing a "not initialized variable" warning - related to:
rails#5237

The logic applied by this method is already handled by the [] override,
so there is no need to reset the variable here.
  • Loading branch information...
commit f1c6037aac9a26b5793e77cac9d9d241786469a6 1 parent eeb715a
@carlosantoniodasilva carlosantoniodasilva authored drogus committed
View
4 activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -113,9 +113,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)
Please sign in to comment.
Something went wrong with that request. Please try again.