summaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-30 09:06:48 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-30 09:06:48 +0000
commit1719dd8b379fa412cf9f5ff66babb7eaceab9b54 (patch)
treec759c75df634fb3c658872623d3fad1e665c5a16 /re.c
parentf9d9ab8b9ec36aa72b907e08b722e0d58d02b18f (diff)
downloadruby-1719dd8b379fa412cf9f5ff66babb7eaceab9b54.tar.gz
ruby-1719dd8b379fa412cf9f5ff66babb7eaceab9b54.tar.xz
ruby-1719dd8b379fa412cf9f5ff66babb7eaceab9b54.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@23916 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 528e94a82..447728da0 100644
--- a/re.c
+++ b/re.c
@@ -2564,7 +2564,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);
}