ext/v8/v8_value.cpp in therubyracer-0.7.0 vs ext/v8/v8_value.cpp in therubyracer-0.7.1.pre

- old
+ new

@@ -5,10 +5,13 @@ using namespace v8; namespace { Local<Value> unwrap(VALUE value) { return V8_Ref_Get<Value>(value); } + VALUE IsEmpty(VALUE value) { + return value == rr_cV8_C_Empty ? Qtrue : Qfalse; + } VALUE IsUndefined(VALUE self) { HandleScope scope; return rr_v82rb(unwrap(self)->IsUndefined()); } VALUE IsNull(VALUE self) { @@ -126,9 +129,10 @@ void rr_init_value() { rr_cV8_C_Value = rr_define_class("Value"); rr_cV8_C_Empty = rr_define_const("Empty", rr_v8_ref_create(rr_cV8_C_Value, Handle<Value>())); + rr_define_method(rr_cV8_C_Value, "IsEmpty", IsEmpty, 0); rr_define_method(rr_cV8_C_Value, "IsUndefined", IsUndefined, 0); rr_define_method(rr_cV8_C_Value, "IsNull", IsNull, 0); rr_define_method(rr_cV8_C_Value, "IsTrue", IsTrue, 0); rr_define_method(rr_cV8_C_Value, "IsFalse", IsFalse, 0); rr_define_method(rr_cV8_C_Value, "IsString", IsString, 0); \ No newline at end of file