diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-05-22 06:59:13 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-05-22 06:59:13 +0900 |
| commit | 4f6bae61eb8873da240741bc06cf0dbb737d9b46 (patch) | |
| tree | 6589d7c6fd9443c59f1e364b8fa916fdf090399f /src | |
| parent | b7049b3945862c7fae803c287d981b33268e955b (diff) | |
| parent | 4308f3c6864be6b5738d4ce3b38d6c40080604b6 (diff) | |
| download | mruby-4f6bae61eb8873da240741bc06cf0dbb737d9b46.tar.gz mruby-4f6bae61eb8873da240741bc06cf0dbb737d9b46.zip | |
Merge pull request #2799 from iij/pr-remove-useless-conditional-in-split
remove an always-true conditional.
Diffstat (limited to 'src')
| -rw-r--r-- | src/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c index 609c68784..e05c6f749 100644 --- a/src/string.c +++ b/src/string.c @@ -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; |
