diff options
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -74,6 +74,24 @@ time_s_now(klass) } static VALUE +time_s_new(argc, argv, klass) + int argc; + VALUE *argv; + VALUE klass; +{ + VALUE obj = time_s_now(klass); + + rb_obj_call_init(obj, argc, argv); + return obj; +} + +static VALUE +time_initialize() +{ + return Qnil; +} + +static VALUE time_new_internal(klass, sec, usec) VALUE klass; time_t sec, usec; @@ -983,7 +1001,7 @@ Init_Time() rb_include_module(rb_cTime, rb_mComparable); rb_define_singleton_method(rb_cTime, "now", time_s_now, 0); - rb_define_singleton_method(rb_cTime, "new", time_s_now, 0); + rb_define_singleton_method(rb_cTime, "new", time_s_new, -1); rb_define_singleton_method(rb_cTime, "at", time_s_at, -1); rb_define_singleton_method(rb_cTime, "gm", time_s_timegm, -1); rb_define_singleton_method(rb_cTime, "local", time_s_timelocal, -1); |