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:
parent
da66234ea4
commit
011e45c6ec
@ -1080,7 +1080,7 @@ readline_char_is_quoted(char *text, int byte_index)
|
|||||||
byte_index, len);
|
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);
|
char_index = rb_str_sublen(str, byte_index);
|
||||||
result = rb_funcall(proc, id_call, 2, str, LONG2FIX(char_index));
|
result = rb_funcall(proc, id_call, 2, str, LONG2FIX(char_index));
|
||||||
return RTEST(result);
|
return RTEST(result);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user