From fff9a7464d6516369c8a8a3720e305ad2fe433aa Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 4 Feb 2010 09:54:54 -0200 Subject: [PATCH] Making SafeBuffer << an alias for concat method --- .../core_ext/string/output_safety.rb | 7 ++----- 1 files changed, 2 insertions(+), 5 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 3977971..567ba00 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 -- 1.6.5