summaryrefslogtreecommitdiff
path: root/ext/readline
diff options
context:
space:
mode:
Diffstat (limited to 'ext/readline')
-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 754f981c1a..6aa9177892 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_PTR(ary)[i]);
+ temp = rb_obj_as_string(RARRAY_CONST_PTR(ary)[i]);
StringValueCStr(temp); /* must be NUL-terminated */
rb_enc_check(encobj, temp);
result[i + 1] = (char*)malloc(RSTRING_LEN(temp) + 1);