Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Making SafeBuffer << an alias for concat method

[#3848 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
commit c65f4b1ffb3862909df7c883f3486e08425bdc6a 1 parent 293c53a
@spastorino spastorino authored jeremy committed
View
7 activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -71,15 +71,12 @@ def concat(value)
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 @@ def html_safe!
def html_safe
ActiveSupport::SafeBuffer.new(self)
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.