From 011e45c6ec2815bd3a481b4ffc5ecd501c051b1f Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 3 Oct 2016 12:39:10 +0000 Subject: use rb_locale_str_new * ext/readline/readline.c (readline_char_is_quoted): use rb_locale_str_new with the length. [Feature #12659] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/readline/readline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3