提交 e12380e7 编写于 作者: J Joshua Peek

Remove concat before overriding it

上级 70d0b7c8
......@@ -7,11 +7,11 @@ def html_safe!
@_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 @@ def +(other)
result
end
end
alias original_concat <<
def <<(other)
result = original_concat(other)
......@@ -30,14 +30,15 @@ def <<(other)
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册