diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-05 18:41:46 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-05 18:41:46 +0000 |
commit | 0b392535df8ef68c969a2900e146d8b91f020706 (patch) | |
tree | 06bf621edbd8509b75ddfea3319a482f4ab1c05d /ext/psych/lib/psych | |
parent | 9670542af57f632460519add916f8e1fd43df5a8 (diff) |
* ext/psych/lib/psych/visitors/to_ruby.rb: backwards compatibility for
hashes emitted by Syck. Github #198
* test/psych/test_hash.rb: test for change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych/lib/psych')
-rw-r--r-- | ext/psych/lib/psych/visitors/to_ruby.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb index 2f84b100d2..234cabc7f9 100644 --- a/ext/psych/lib/psych/visitors/to_ruby.rb +++ b/ext/psych/lib/psych/visitors/to_ruby.rb @@ -201,6 +201,8 @@ module Psych class_loader.rational h = Hash[*o.children.map { |c| accept c }] register o, Rational(h['numerator'], h['denominator']) + elsif name == 'Hash' + revive_hash(register(o, {}), o) else obj = revive((resolve_class(name) || class_loader.object), o) obj |