Commit 4f6bae61 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2799 from iij/pr-remove-useless-conditional-in-split

remove an always-true conditional.
parents b7049b39 4308f3c6
......@@ -1805,7 +1805,7 @@ mrb_str_split_m(mrb_state *mrb, mrb_value str)
mrb_int idx = 0;
int ai = mrb_gc_arena_save(mrb);
while (idx < str_len && 1) {
while (idx < str_len) {
if (pat_len > 0) {
end = mrb_memsearch(RSTRING_PTR(spat), pat_len, RSTRING_PTR(str)+idx, str_len - idx);
if (end < 0) break;
......
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