diff --git a/lib/v8/array.rb b/lib/v8/array.rb index fe681f0..22c624e 100644 --- a/lib/v8/array.rb +++ b/lib/v8/array.rb @@ -3,8 +3,10 @@ module V8 class Array < V8::Object def each - for i in 0..(@native.Length() - 1) - yield To.ruby(@native.Get(i)) + @context.enter do + for i in 0..(@native.Length() - 1) + yield To.ruby(@native.Get(i)) + end end end diff --git a/spec/redjs b/spec/redjs index f1d47fe..08ba26e 160000 --- a/spec/redjs +++ b/spec/redjs @@ -1 +1 @@ -Subproject commit f1d47fe8303d6ae6a85d6e523368f79a20c4354e +Subproject commit 08ba26e9295d69c09ecc0ed76c1346b98e52a066