From 4890f3a684aff94d93a5cc3f68fa8c67c1da6c19 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 29 Feb 2000 08:05:32 +0000 Subject: 2000-02-29 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- time.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'time.c') diff --git a/time.c b/time.c index 8f94549e74..346227faa8 100644 --- a/time.c +++ b/time.c @@ -73,6 +73,24 @@ time_s_now(klass) return obj; } +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; @@ -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); -- cgit v1.2.3