summaryrefslogtreecommitdiffstats
path: root/time.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-29 08:05:32 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-29 08:05:32 +0000
commit5928d4c1e01a076c3c992b3a003c167a5d4b7600 (patch)
tree3e43148d3114380fff1418aa3ff6d01b157a97e4 /time.c
parentac9d16f8b62f24b7bb7190888b6bc28cf2e75af9 (diff)
downloadruby-5928d4c1e01a076c3c992b3a003c167a5d4b7600.tar.gz
ruby-5928d4c1e01a076c3c992b3a003c167a5d4b7600.tar.xz
ruby-5928d4c1e01a076c3c992b3a003c167a5d4b7600.zip
2000-02-29
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/time.c b/time.c
index 8f94549e7..346227faa 100644
--- a/time.c
+++ b/time.c
@@ -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);