提交 1f6c5677 编写于 作者: J Jeremy Kemper

OutputBuffer#to_yaml should return string yaml, not some custom class dump

上级 698312de
......@@ -88,6 +88,10 @@ def html_safe
def to_s
self
end
def to_yaml
"".replace(self).to_yaml
end
end
end
......
......@@ -444,6 +444,10 @@ def to_s
assert_equal "hello".concat(13), string
assert string.html_safe?
end
test 'emits normal string yaml' do
assert_equal 'foo'.to_yaml, 'foo'.html_safe.to_yaml
end
end
class StringExcludeTest < ActiveSupport::TestCase
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册