From c96501058270d16b4be35c0cbc8b008182524da0 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 13 Sep 2008 16:40:31 +0000 Subject: * include/ruby/oniguruma.h (onigenc_get_right_adjust_char_head): add end argument. * include/ruby/encoding.h (rb_enc_right_char_head): add end argument. * regenc.c (onigenc_get_right_adjust_char_head): use end argument. * re.c (rb_reg_adjust_startpos): follow the interface change. * string.c (rb_str_index): ditto. * regexec.c (backward_search_range): ditto. (onig_search): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- re.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 're.c') diff --git a/re.c b/re.c index a17874ab71..82463fee79 100644 --- a/re.c +++ b/re.c @@ -1264,7 +1264,7 @@ rb_reg_adjust_startpos(VALUE re, VALUE str, int pos, int reverse) string = (UChar*)RSTRING_PTR(str); if (range > 0) { - p = onigenc_get_right_adjust_char_head(enc, string, string + pos); + p = onigenc_get_right_adjust_char_head(enc, string, string + pos, string + RSTRING_LEN(str)); } else { p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, string, string + pos); -- cgit v1.2.3