summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-30 06:12:29 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-30 06:12:29 +0000
commit34f5c4061c6583fe854bdf8c792a6ffc226e3986 (patch)
tree3bedb874808188b29de760c9dcc1baa80542b85e /time.c
parent21b2953030930e634da9aced44f71f019a599ad9 (diff)
* range.c (range_step): iteration done using "+" if elements are
Numeric. Otherwise using "succ". * range.c (range_each): iteration done using "succ". If the elements does not respond to "succ", raise TypeError. As a result, all Enumerable methods, e.g. collect, require elements to respond to "succ'. * range.c (range_member): comparison done using "each", if elements are non-Numeric or no-"succ" objects. Otherwise compare using "<=>". * range.c (Init_Range): remove "size" and "length". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/time.c b/time.c
index 971d21d..3d16676 100644
--- a/time.c
+++ b/time.c
@@ -691,16 +691,6 @@ time_usec(time)
}
static VALUE
-time_succ(time)
- VALUE time;
-{
- struct time_object *tobj;
-
- GetTimeval(time, tobj);
- return rb_time_new(tobj->tv.tv_sec + 1, tobj->tv.tv_usec);
-}
-
-static VALUE
time_cmp(time1, time2)
VALUE time1, time2;
{
@@ -1449,8 +1439,6 @@ Init_Time()
rb_define_method(rb_cTime, "hash", time_hash, 0);
rb_define_method(rb_cTime, "clone", time_clone, 0);
rb_define_method(rb_cTime, "dup", time_dup, 0);
- rb_define_method(rb_cTime, "succ", time_succ, 0);
- rb_define_method(rb_cTime, "next", time_succ, 0);
rb_define_method(rb_cTime, "localtime", time_localtime, 0);
rb_define_method(rb_cTime, "gmtime", time_gmtime, 0);