summaryrefslogtreecommitdiffstats
path: root/compar.c
diff options
context:
space:
mode:
authormichal <michal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-22 06:30:41 +0000
committermichal <michal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-22 06:30:41 +0000
commit23576240b32b43121d3cda918ffe427043501d68 (patch)
tree1d20dc8916c791347f132cc797eacbb1e81a81a0 /compar.c
parent9e1c17eb5f3309d55aa327a5538641d24be2c084 (diff)
downloadruby-23576240b32b43121d3cda918ffe427043501d68.tar.gz
ruby-23576240b32b43121d3cda918ffe427043501d68.tar.xz
ruby-23576240b32b43121d3cda918ffe427043501d68.zip
Remove explicit NIL_P() checks since rb_cmpint() does it again in the exactly same manner.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compar.c')
-rw-r--r--compar.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/compar.c b/compar.c
index 1488b2c65..a3ee68477 100644
--- a/compar.c
+++ b/compar.c
@@ -50,8 +50,6 @@ rb_cmperr(x, y)
rb_obj_classname(x), classname);
}
-#define cmperr() (rb_cmperr(x, y), Qnil)
-
static VALUE
cmp_eq(a)
VALUE *a;
@@ -104,7 +102,6 @@ cmp_gt(x, y)
{
VALUE c = rb_funcall(x, cmp, 1, y);
- if (NIL_P(c)) return cmperr();
if (rb_cmpint(c, x, y) > 0) return Qtrue;
return Qfalse;
}
@@ -123,7 +120,6 @@ cmp_ge(x, y)
{
VALUE c = rb_funcall(x, cmp, 1, y);
- if (NIL_P(c)) return cmperr();
if (rb_cmpint(c, x, y) >= 0) return Qtrue;
return Qfalse;
}
@@ -142,7 +138,6 @@ cmp_lt(x, y)
{
VALUE c = rb_funcall(x, cmp, 1, y);
- if (NIL_P(c)) return cmperr();
if (rb_cmpint(c, x, y) < 0) return Qtrue;
return Qfalse;
}
@@ -162,7 +157,6 @@ cmp_le(x, y)
{
VALUE c = rb_funcall(x, cmp, 1, y);
- if (NIL_P(c)) return cmperr();
if (rb_cmpint(c, x, y) <= 0) return Qtrue;
return Qfalse;
}