Skip to content

Commit

Permalink
Be sure to pass through args to to_yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Mar 12, 2010
1 parent eed8a88 commit 40c393c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -109,8 +109,8 @@ def as_str
''.replace(self) ''.replace(self)
end end


def to_yaml def to_yaml(*args)
as_str.to_yaml as_str.to_yaml(*args)
end end
end end
end end
Expand Down
2 changes: 1 addition & 1 deletion activesupport/test/core_ext/string_ext_test.rb
Expand Up @@ -501,6 +501,6 @@ def to_s
end end


test 'emits normal string yaml' do test 'emits normal string yaml' do
assert_equal 'foo'.to_yaml, 'foo'.html_safe.to_yaml assert_equal 'foo'.to_yaml, 'foo'.html_safe.to_yaml(:foo => 1)
end end
end end

0 comments on commit 40c393c

Please sign in to comment.