From c65f4b1ffb3862909df7c883f3486e08425bdc6a Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 4 Feb 2010 09:54:54 -0200 Subject: Making SafeBuffer << an alias for concat method [#3848 state:committed] Signed-off-by: Jeremy Kemper --- activesupport/lib/active_support/core_ext/string/output_safety.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'activesupport') 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 3977971e8d..567ba00b0d 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -71,15 +71,12 @@ module ActiveSupport #:nodoc: super(ERB::Util.h(value)) end end + alias << concat def +(other) dup.concat(other) end - def <<(value) - self.concat(value) - end - def html_safe? true end @@ -102,4 +99,4 @@ class String def html_safe ActiveSupport::SafeBuffer.new(self) end -end \ No newline at end of file +end -- cgit v1.2.3