diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-29 08:05:32 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-29 08:05:32 +0000 |
commit | 4890f3a684aff94d93a5cc3f68fa8c67c1da6c19 (patch) | |
tree | 3e43148d3114380fff1418aa3ff6d01b157a97e4 /time.c | |
parent | 0c123a83f0446204d974318b578236c949e5a01f (diff) | |
download | ruby-4890f3a684aff94d93a5cc3f68fa8c67c1da6c19.tar.gz |
2000-02-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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); |