summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 130ea9ce59..b03f04d2fa 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -1080,7 +1080,7 @@ readline_char_is_quoted(char *text, int byte_index)
byte_index, len);
}
- str = rb_locale_str_new_cstr(text);
+ str = rb_locale_str_new(text, len);
char_index = rb_str_sublen(str, byte_index);
result = rb_funcall(proc, id_call, 2, str, LONG2FIX(char_index));
return RTEST(result);