Skip to content

Commit

Permalink
Stop SafeBuffer#clone_empty from issuing warnings
Browse files Browse the repository at this point in the history
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
carlosantoniodasilva committed Mar 2, 2012
1 parent 9078dba commit 681d89f
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -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)
Expand Down

0 comments on commit 681d89f

Please sign in to comment.