diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-09 00:56:45 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-09 00:56:45 +0000 |
commit | b90076e85c3b2e29a4e6bd56b01c03d77b2bc1cd (patch) | |
tree | 46a001d110ecf9a0cca52fda5eb2aae2650696e6 /ext/psych | |
parent | 73b046d0f135204dd63a9d1ae344bfd0e1a45c55 (diff) | |
download | ruby-b90076e85c3b2e29a4e6bd56b01c03d77b2bc1cd.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
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych')
-rw-r--r-- | ext/psych/lib/psych.rb | 1 | ||||
-rw-r--r-- | ext/psych/lib/psych/visitors/yaml_tree.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ext/psych/lib/psych.rb b/ext/psych/lib/psych.rb index b5050b15e6..47802a48e7 100644 --- a/ext/psych/lib/psych.rb +++ b/ext/psych/lib/psych.rb @@ -14,6 +14,7 @@ require 'psych/stream' require 'psych/json/tree_builder' require 'psych/json/stream' require 'psych/handlers/document_stream' +require 'psych/class_loader' ### # = Overview diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb index 1cb2137693..f89fcbb8f1 100644 --- a/ext/psych/lib/psych/visitors/yaml_tree.rb +++ b/ext/psych/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) |