aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/numeric.c b/numeric.c
index a330cf0905..5a08f0637b 100644
--- a/numeric.c
+++ b/numeric.c
@@ -132,15 +132,15 @@ do_coerce(VALUE *x, VALUE *y, int err)
a[0] = *x; a[1] = *y;
ary = rb_rescue(coerce_body, (VALUE)a, err?coerce_rescue:0, (VALUE)a);
- if (TYPE(ary) != T_ARRAY || RARRAY(ary)->len != 2) {
+ if (TYPE(ary) != T_ARRAY || RARRAY_LEN(ary) != 2) {
if (err) {
rb_raise(rb_eTypeError, "coerce must return [x, y]");
}
return Qfalse;
}
- *x = RARRAY(ary)->ptr[0];
- *y = RARRAY(ary)->ptr[1];
+ *x = RARRAY_PTR(ary)[0];
+ *y = RARRAY_PTR(ary)[1];
return Qtrue;
}