diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-12-01 23:25:24 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-12-01 23:25:24 -0600 |
commit | e12380e7877abb3dafeb7875fb74c272e5cbeee0 (patch) | |
tree | 0cb033220a7174edff679e21c230068973750c0c /activesupport/lib | |
parent | 70d0b7c87a492aef141859127d1b9fec6b4b09f3 (diff) | |
download | rails-e12380e7877abb3dafeb7875fb74c272e5cbeee0.tar.gz rails-e12380e7877abb3dafeb7875fb74c272e5cbeee0.tar.bz2 rails-e12380e7877abb3dafeb7875fb74c272e5cbeee0.zip |
Remove concat before overriding it
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/output_safety.rb | 13 |
1 files changed, 7 insertions, 6 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 2cca4763f4..a2a88eb7df 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -7,11 +7,11 @@ class String @_rails_html_safe = true self end - + def html_safe dup.html_safe! end - + alias original_plus + def +(other) result = original_plus(other) @@ -21,7 +21,7 @@ class String result end end - + alias original_concat << def <<(other) result = original_concat(other) @@ -30,14 +30,15 @@ class String end result end - + + remove_method :concat def concat(other) self << other end - + private def also_html_safe?(other) other.respond_to?(:html_safe?) && other.html_safe? end - + end
\ No newline at end of file |