summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-24 13:18:54 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-24 13:18:54 (GMT)
commited77aff154497bd7fc9941277842481a8d0d00d4 (patch)
tree999d7d6aac1085292f45590bc0363435689063ad /re.c
parentf001a450f2263a74cc38e650361da161305d776f (diff)
* string.c (rb_str_rpartition): revert r39903, and convert byte offset
to char offset; the return value of rb_reg_search is byte offset, but other than it of rb_str_rpartition expects char offset. [Bug #8138] [ruby-dev:47183] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/re.c b/re.c
index 4e57971..91d34eb 100644
--- a/re.c
+++ b/re.c
@@ -1348,6 +1348,7 @@ rb_reg_adjust_startpos(VALUE re, VALUE str, long pos, int reverse)
return pos;
}
+/* returns byte offset */
long
rb_reg_search(VALUE re, VALUE str, long pos, int reverse)
{