summaryrefslogtreecommitdiff
path: root/ext/readline
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-10-03 12:39:10 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-10-03 12:39:10 (GMT)
commit011e45c6ec2815bd3a481b4ffc5ecd501c051b1f (patch)
tree18cbcb7cb4f66d317b74639e5607e2ce4d3d08c0 /ext/readline
parentda66234ea4da275d4db43cdc41298a754fffa812 (diff)
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
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 130ea9c..b03f04d 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);