summaryrefslogtreecommitdiff
path: root/compar.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-31 04:36:38 (GMT)
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-31 04:36:38 (GMT)
commit374ea2790eb49b60064fe720219a70b1ffc26b49 (patch)
tree63f3802266420dcfeef1b188f644946650d7746c /compar.c
parent7d87fac63ad2f1a798c7fed4b424f1fc5763470c (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compar.c')
-rw-r--r--compar.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/compar.c b/compar.c
index 6971061..b21a83c 100644
--- a/compar.c
+++ b/compar.c
@@ -34,6 +34,13 @@ cmp_failed()
}
static VALUE
+cmp_eq2(a)
+ VALUE *a;
+{
+ return rb_rescue(cmp_eq, (VALUE)a, cmp_failed, 0);
+}
+
+static VALUE
cmp_equal(x, y)
VALUE x, y;
{
@@ -42,7 +49,7 @@ cmp_equal(x, y)
if (x == y) return Qtrue;
a[0] = x; a[1] = y;
- return rb_rescue(cmp_eq, (VALUE)a, cmp_failed, 0);
+ return rb_rescue2(cmp_eq2, (VALUE)a, rb_eScriptError, cmp_failed, 0);
}
static VALUE