summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/array.c b/array.c
index a15f0530ae..93390d6455 100644
--- a/array.c
+++ b/array.c
@@ -803,8 +803,8 @@ Fary_assoc(ary, key)
p = ary->ptr; pend = p + ary->len;
while (p < pend) {
- if (TYPE(*p) == T_CONS
- && rb_equal(RCONS(*p)->car, key))
+ if (TYPE(*p) == T_ASSOC
+ && rb_equal(RASSOC(*p)->car, key))
return *p;
}
return Qnil;
@@ -819,8 +819,8 @@ Fary_rassoc(ary, value)
p = ary->ptr; pend = p + ary->len;
while (p < pend) {
- if (TYPE(*p) == T_CONS
- && rb_equal(RCONS(*p)->cdr, value))
+ if (TYPE(*p) == T_ASSOC
+ && rb_equal(RASSOC(*p)->cdr, value))
return *p;
}
return Qnil;