summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-12 14:45:43 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-12 14:45:43 +0000
commit72c0d800b47324cebc95e1ddc5effb8c5e8323a6 (patch)
treee51327449a35d00cfd4d183ba559c22682202887 /re.c
parent64f82e294aa003188b675e8ee6b2f3ba3a015813 (diff)
merges r23916 from trunk into ruby_1_9_1.
-- * re.c (reg_match_pos): adjust offset based on characters, not bytes. [ruby-dev:38722] * string.c (rb_str_offset): new function. * string.c (rb_str_index_m): no call to rb_reg_adjust_startpos(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index 938b96daf8..699e90ab4d 100644
--- a/re.c
+++ b/re.c
@@ -2546,7 +2546,7 @@ reg_match_pos(VALUE re, VALUE *strp, long pos)
return pos;
}
}
- pos = rb_reg_adjust_startpos(re, str, pos, 0);
+ pos = rb_str_offset(str, pos);
}
return rb_reg_search(re, str, pos, 0);
}