summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 3dca59b6db..99813c9694 100644
--- a/string.c
+++ b/string.c
@@ -848,7 +848,7 @@ rb_str_index(str, sub, offset)
if (RSTRING(str)->len - offset < RSTRING(sub)->len) return -1;
if (RSTRING(sub)->len == 0) return offset;
pos = rb_memsearch(RSTRING(sub)->ptr, RSTRING(sub)->len,
- RSTRING(str)->ptr+offset, RSTRING(str)->len-offset);
+ RSTRING(str)->ptr+offset, RSTRING(str)->len-offset);
if (pos < 0) return pos;
return pos + offset;
}