From 653b0bcbafcbddc9811c06e984f1bbeee2330ddf Mon Sep 17 00:00:00 2001 From: tenderlove Date: Sat, 17 Nov 2012 03:15:54 +0000 Subject: * ext/psych/lib/psych/visitors/yaml_tree.rb: use literal YAML style when emitting multi-line strings. Thanks @atambo * test/psych/test_yaml.rb: test for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/psych/test_yaml.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/psych') diff --git a/test/psych/test_yaml.rb b/test/psych/test_yaml.rb index 796a44fa2b..cbda3859e6 100644 --- a/test/psych/test_yaml.rb +++ b/test/psych/test_yaml.rb @@ -1266,4 +1266,9 @@ EOY Psych.load("2000-01-01 00:00:00.#{"0"*1000} +00:00\n") # '[ruby-core:13735]' end + + def test_multiline_string_uses_literal_style + yaml = Psych.dump("multi\nline\nstring") + assert_match("|", yaml) + end end -- cgit v1.2.3