diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-09-05 10:40:42 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-09-05 10:40:42 -0700 |
commit | 684612c46ee5534904fb811bc3548219fc38ea26 (patch) | |
tree | 24afb2e471a77ff703f495f3c75d7c9b93834717 /test | |
parent | 02f0498a91b11a3b187812a188bb9e44271f73d7 (diff) | |
download | psych-684612c46ee5534904fb811bc3548219fc38ea26.zip |
* ext/psych/lib/psych/visitors/yaml_tree.rb: use double quotes when
strings start with special characters.
[Fixes GH-157] https://github.com/tenderlove/psych/issues/157
* test/psych/test_string.rb: test for change.
Fixes #157
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_string.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/psych/test_string.rb b/test/psych/test_string.rb index 2512bb6..025ef95 100644 --- a/test/psych/test_string.rb +++ b/test/psych/test_string.rb @@ -15,6 +15,11 @@ module Psych end end + def test_doublequotes_when_there_is_a_single + yaml = Psych.dump "@123'abc" + assert_match(/---\s*"/, yaml) + end + def test_dash_dot assert_cycle '-.' assert_cycle '+.' |