diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-08 22:25:31 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-08 22:25:31 +0000 |
commit | 344b8bbd697ba7ade949da3968b9f5e6226f832f (patch) | |
tree | 99d8f602146fc84b20bc53933fb07605eaebe96c /ext/psych/lib/psych | |
parent | 5dabead1871ed0100674e3eeb4a9f549b1997a85 (diff) |
* ext/psych/lib/psych/visitors/yaml_tree.rb: correctly quote non-ascii
letters. Thanks @jirutka for the patch.
* test/psych/test_string.rb: test for change
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych/lib/psych')
-rw-r--r-- | ext/psych/lib/psych/visitors/yaml_tree.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb index bedf9d35b2..3a6bd1da54 100644 --- a/ext/psych/lib/psych/visitors/yaml_tree.rb +++ b/ext/psych/lib/psych/visitors/yaml_tree.rb @@ -317,7 +317,7 @@ module Psych tag = 'tag:yaml.org,2002:str' plain = false quote = false - elsif o =~ /^\W[^"]*$/ + elsif o =~ /^[^[:word:]][^"]*$/ style = Nodes::Scalar::DOUBLE_QUOTED else unless String === @ss.tokenize(o) |