diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-29 21:02:19 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-29 21:02:19 +0000 |
commit | 7a5dedf25c81aac6d14c35110e42f2f01d01a103 (patch) | |
tree | 0ad059dbece2076ec2b391f09253a448fafa3ae9 /ext/psych/lib/psych/visitors/to_ruby.rb | |
parent | 7df9a77da1947c617662148f6485dc58967277f2 (diff) |
* ext/psych/lib/psych/visitors/to_ruby.rb: quoted "<<" strings
should not be treated as merge keys.
* ext/psych/lib/psych/visitors/yaml_tree.rb: hashes with keys
containing "<<" should roundtrip.
* test/psych/test_merge_keys.rb: test for change. Fixes GH #203
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych/lib/psych/visitors/to_ruby.rb')
-rw-r--r-- | ext/psych/lib/psych/visitors/to_ruby.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb index 234cabc7f9..984bc84ed3 100644 --- a/ext/psych/lib/psych/visitors/to_ruby.rb +++ b/ext/psych/lib/psych/visitors/to_ruby.rb @@ -305,7 +305,7 @@ module Psych key = accept(k) val = accept(v) - if key == '<<' + if key == '<<' && k.tag != "tag:yaml.org,2002:str" case v when Nodes::Alias begin |