diff --git a/lib/v8/to.rb b/lib/v8/to.rb index dc23ed4..5c27df5 100644 --- a/lib/v8/to.rb +++ b/lib/v8/to.rb @@ -41,6 +41,12 @@ module V8 a.Set(i, To.v8(item)) end end + when ::Hash + C::Object::New().tap do |o| + value.each do |key, value| + o.Set(To.v8(key), To.v8(value)) + end + end when nil,Numeric value else diff --git a/spec/redjs b/spec/redjs index b741908..4cfdb1c 160000 --- a/spec/redjs +++ b/spec/redjs @@ -1 +1 @@ -Subproject commit b74190886c2a7c8ff33fc4d927162d068fc9802e +Subproject commit 4cfdb1cd934d27d8e8d38bb99871036884a26d39