diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-17 03:15:54 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-17 03:15:54 +0000 |
commit | 653b0bcbafcbddc9811c06e984f1bbeee2330ddf (patch) | |
tree | 62b3cdc8384a993e90fd7f679867d8f833d72863 /test/psych | |
parent | 24c6a7c3680b7a4b40526e28391fabe5e5c36ce3 (diff) | |
download | ruby-653b0bcbafcbddc9811c06e984f1bbeee2330ddf.tar.gz |
* 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
Diffstat (limited to 'test/psych')
-rw-r--r-- | test/psych/test_yaml.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |