Commit 0d8adaaa authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

wrong String#index behavior on udef INCLUDE_ENCODING

parent 708c4558
......@@ -1411,7 +1411,7 @@ mrb_str_index(mrb_state *mrb, mrb_value str, mrb_value sub, mrb_int offset)
s = t;
}
#else
pos = mrb_memsearch(sptr, slen, s+offset, len-offset);
pos = mrb_memsearch(sptr, slen, s, len);
if (pos < 0) return pos;
#endif //INCLUDE_ENCODING
return pos + offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment