diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-01-08 16:57:15 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-01-08 16:57:15 -0800 |
commit | a479e141bfab70a21cdb3936d4a930c7b3885a9c (patch) | |
tree | f288b0a500408691f84f90fc8b88c6a5ca133cb9 /lib | |
parent | bfd62dc4dd23211024b46ab7d29ecec7a407e168 (diff) | |
download | psych-a479e141bfab70a21cdb3936d4a930c7b3885a9c.tar.gz |
* ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings with
quotes should not have changed. [ruby-core:59316] [Bug #9300]
* ext/psych/lib/psych.rb: fixed missing require.
* test/psych/test_string.rb: test
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psych/visitors/yaml_tree.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/psych/visitors/yaml_tree.rb b/lib/psych/visitors/yaml_tree.rb index 1cb2137..f89fcbb 100644 --- a/lib/psych/visitors/yaml_tree.rb +++ b/lib/psych/visitors/yaml_tree.rb @@ -284,7 +284,7 @@ module Psych quote = false elsif o =~ /\n/ style = Nodes::Scalar::LITERAL - elsif o =~ /^\W/ + elsif o =~ /^\W[^"]*$/ style = Nodes::Scalar::DOUBLE_QUOTED else unless String === @ss.tokenize(o) |