From c1b8bd473a66b96daa6f74956a01eb124f389d5d Mon Sep 17 00:00:00 2001 From: Scott Fleckenstein Date: Thu, 27 May 2010 06:24:59 +0800 Subject: [PATCH] recursively To.ruby a native objects properties so that to_h will properly deal with nested objects --- lib/rhino/native_object.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rhino/native_object.rb b/lib/rhino/native_object.rb index 97a59bf..81e85d6 100644 --- a/lib/rhino/native_object.rb +++ b/lib/rhino/native_object.rb @@ -57,6 +57,7 @@ module Rhino def to_h {}.tap do |h| each do |k,v| + v = To.ruby(v) h[k] = self.class === v ? v.to_h : v end end