ext/v8/v8_function.cpp in mustang-0.1.1 vs ext/v8/v8_function.cpp in mustang-0.2.0

- old
+ new

@@ -59,10 +59,12 @@ * */ static VALUE rb_v8_function_new(int argc, VALUE *argv, VALUE klass) { HandleScope scope; + PREVENT_CREATION_WITHOUT_CONTEXT(); + VALUE orig; if (rb_block_given_p()) { orig = rb_block_proc(); } else { @@ -74,9 +76,10 @@ } } VALUE self = v8_ref_new(klass, to_v8_function(orig), orig); rb_iv_set(self, "@origin", orig); + rb_iv_set(self, "@receiver", Qnil); v8_set_peer(self); return self; }