aboutsummaryrefslogtreecommitdiffstats
path: root/vm_method.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_method.c b/vm_method.c
index 516b87cb3e..3882b98d4e 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -1574,8 +1574,8 @@ rb_obj_respond_to(VALUE obj, ID id, int priv)
(FL_TEST(klass, FL_SINGLETON) ? '.' : '#'),
QUOTE_ID(id));
if (!NIL_P(location)) {
- VALUE path = RARRAY_PTR(location)[0];
- VALUE line = RARRAY_PTR(location)[1];
+ VALUE path = RARRAY_AREF(location, 0);
+ VALUE line = RARRAY_AREF(location, 1);
if (!NIL_P(path)) {
rb_compile_warn(RSTRING_PTR(path), NUM2INT(line),
"respond_to? is defined here");