From a479e141bfab70a21cdb3936d4a930c7b3885a9c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 8 Jan 2014 16:57:15 -0800 Subject: * 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 --- lib/psych/visitors/yaml_tree.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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) -- cgit v1.2.1