summaryrefslogtreecommitdiff
path: root/ext/psych
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych')
-rw-r--r--ext/psych/lib/psych.rb1
-rw-r--r--ext/psych/lib/psych/visitors/yaml_tree.rb2
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)