diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-02-04 09:54:54 -0200 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-05 13:26:29 -0800 |
commit | c65f4b1ffb3862909df7c883f3486e08425bdc6a (patch) | |
tree | a22c217ca8b49674309ab91b97cdde98a037ec30 /activesupport/lib/active_support/core_ext/string | |
parent | 293c53ab3e3795cf0837c0b9225d64b3d906b8aa (diff) | |
download | rails-c65f4b1ffb3862909df7c883f3486e08425bdc6a.tar.gz rails-c65f4b1ffb3862909df7c883f3486e08425bdc6a.tar.bz2 rails-c65f4b1ffb3862909df7c883f3486e08425bdc6a.zip |
Making SafeBuffer << an alias for concat method
[#3848 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string')
-rw-r--r-- | activesupport/lib/active_support/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 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 |