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:

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

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...
carlosantoniodasilva authored and drogus committed Mar 2, 2012
1 parent 11881ad commit 66c6c7f87d5619eff953650ac095d6e9898ee346
Showing with 1 addition and 3 deletions.
  1. +1 −3 activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -114,9 +114,7 @@ def initialize_copy(other)
def clone_empty
- new_safe_buffer = self[0, 0]
- new_safe_buffer.instance_variable_set(:@dirty, @dirty)
- new_safe_buffer
+ self[0, 0]
def concat(value)

0 comments on commit 66c6c7f

Please sign in to comment.