aboutsummaryrefslogtreecommitdiffstats
path: root/compar.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-06 17:11:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-06 17:11:50 +0000
commitbdc00ba604b74646fbf551a544d973466ce39558 (patch)
tree89f1305b01dd6a98f5db131b1a235dcd767bd4ad /compar.c
parenta06fc80da67570a53c4790f7d7e053222aeef2a5 (diff)
downloadruby-bdc00ba604b74646fbf551a544d973466ce39558.tar.gz
* bignum.c (rb_cmpint): moved from compar.c, to check bignum
zero. * range.c (range_step): add step for each iteration if begin and end are numeric. [ruby-core:15990] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compar.c')
-rw-r--r--compar.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/compar.c b/compar.c
index 3909357576..55b217a60a 100644
--- a/compar.c
+++ b/compar.c
@@ -15,22 +15,6 @@ VALUE rb_mComparable;
static ID cmp;
-int
-rb_cmpint(VALUE val, VALUE a, VALUE b)
-{
- if (NIL_P(val)) {
- rb_cmperr(a, b);
- }
- if (FIXNUM_P(val)) return FIX2INT(val);
- if (TYPE(val) == T_BIGNUM) {
- if (RBIGNUM_SIGN(val)) return 1;
- return -1;
- }
- if (RTEST(rb_funcall(val, '>', 1, INT2FIX(0)))) return 1;
- if (RTEST(rb_funcall(val, '<', 1, INT2FIX(0)))) return -1;
- return 0;
-}
-
void
rb_cmperr(VALUE x, VALUE y)
{