1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2016-10-03 12:39:10 +00:00
parent da66234ea4
commit 011e45c6ec

View file

@ -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);