From d4c7cca6fcdd207db8d6463d06e5682a769de411 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 3 May 2011 14:54:57 -0500 Subject: [PATCH] use object reflection semantics for v8::Date --- ext/v8/v8_date.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/v8/v8_date.cpp b/ext/v8/v8_date.cpp index 21c7f72..425c67e 100644 --- a/ext/v8/v8_date.cpp +++ b/ext/v8/v8_date.cpp @@ -2,6 +2,7 @@ #include "v8_date.h" #include "v8_value.h" #include "v8_handle.h" +#include "v8_object.h" using namespace v8; @@ -29,7 +30,5 @@ void rr_init_v8_date() { } VALUE rr_reflect_v8_date(Handle value) { - HandleScope hs; - Local date(Date::Cast(*value)); - return rr_v8_handle_new(DateClass, date); + return rr_reflect_v8_object_as(Handle::Cast(value), DateClass); } \ No newline at end of file