1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

use object reflection semantics for v8::Date

This commit is contained in:
Charles Lowell 2011-05-03 14:54:57 -05:00
parent dd7f1ffd21
commit d4c7cca6fc

View file

@ -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> value) {
HandleScope hs;
Local<Date> date(Date::Cast(*value));
return rr_v8_handle_new(DateClass, date);
return rr_reflect_v8_object_as(Handle<Object>::Cast(value), DateClass);
}