summaryrefslogtreecommitdiff
path: root/ext/readline/readline.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/readline/readline.c')
-rw-r--r--ext/readline/readline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 6aa9177..c3b98a8 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -963,7 +963,7 @@ readline_attempted_completion_function(const char *text, int start, int end)
enc = rb_locale_encoding();
encobj = rb_enc_from_encoding(enc);
for (i = 0; i < matches; i++) {
- temp = rb_obj_as_string(RARRAY_CONST_PTR(ary)[i]);
+ temp = rb_obj_as_string(RARRAY_AREF(ary, i));
StringValueCStr(temp); /* must be NUL-terminated */
rb_enc_check(encobj, temp);
result[i + 1] = (char*)malloc(RSTRING_LEN(temp) + 1);