aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-03-02 10:54:16 -0300
committerPiotr Sarnacki <drogus@gmail.com>2012-03-02 16:05:46 +0100
commit5fd360133a569c033dc2904fe3f4eed615586106 (patch)
tree2df5fd91083cd4280ec841ed1eb0396b5d775037 /activesupport
parent1a71e84ad8b21144e4fa2b01cc3fc8d4fc375de1 (diff)
downloadrails-5fd360133a569c033dc2904fe3f4eed615586106.tar.gz
rails-5fd360133a569c033dc2904fe3f4eed615586106.tar.bz2
rails-5fd360133a569c033dc2904fe3f4eed615586106.zip
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.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/string/output_safety.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb
index 4089b02d45..f5622224d2 100644
--- a/activesupport/lib/active_support/core_ext/string/output_safety.rb
+++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -126,9 +126,7 @@ module ActiveSupport #:nodoc:
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)