ActiveSupport::SafeBuffer#prepend inconsistency #14529
Make `#prepend` method modify instance in-place and return self instead of just returning modified value. That is exactly what `#prepend!` method was doing previously, so it's deprecated from now on.
Do we want
def concat(value) super(maybe_escape(value)) end def prepend(value) super(maybe_escape(value)) end private def maybe_escape(value) if html_safe? && !value.html_safe? ERB::Util.h(value) else value end end
Hmm, I just realised there's actually already
As for visually matching methods, I personally don't think that's particularly confusing -- especially when the very first word of the method body is 'super'... but I'm just thinking out loud. It's up to @rafaelfranca which he prefers. And the one that someone cared enough to make, sure has a certain argument over my bikeshedding.