ext/v8/v8_value.cpp in mustang-0.2.1 vs ext/v8/v8_value.cpp in mustang-0.2.2
- old
+ new
@@ -19,11 +19,15 @@
* Returns new V8 value reflected from given object.
*
*/
static VALUE rb_v8_value_new(VALUE self, VALUE data)
{
- HandleScope scope;
- PREVENT_CREATION_WITHOUT_CONTEXT();
+ HandleScope scope;
+
+ if (data != Qtrue && data != Qfalse && data != Qnil) {
+ PREVENT_CREATION_WITHOUT_CONTEXT();
+ }
+
return v8_ref_new(self, to_v8(data));
}
/*
* call-seq: