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