summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorJun Hiroe <[email protected]>2014-05-05 12:49:08 +0900
committerJun Hiroe <[email protected]>2014-05-05 12:49:08 +0900
commit2f8de5b32b15bcae069666c574bc1bec8fbcd5b2 (patch)
tree990783793902bd5fe06561d9a19c541e3e802860 /src/string.c
parente340babc1e52cdb2fde87ae34ed9d93baa19f334 (diff)
downloadmruby-2f8de5b32b15bcae069666c574bc1bec8fbcd5b2.tar.gz
mruby-2f8de5b32b15bcae069666c574bc1bec8fbcd5b2.zip
Refactor mrb_str_split_m()
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string.c b/src/string.c
index f3f777015..c8fcc7282 100644
--- a/src/string.c
+++ b/src/string.c
@@ -1851,7 +1851,7 @@ mrb_str_split_m(mrb_state *mrb, mrb_value str)
char *ptr = RSTRING_PTR(str);
char *eptr = RSTRING_END(str);
char *bptr = ptr;
- int skip = 1;
+ mrb_bool skip = TRUE;
unsigned int c;
end = beg;
@@ -1864,14 +1864,14 @@ mrb_str_split_m(mrb_state *mrb, mrb_value str)
}
else {
end = ptr - bptr;
- skip = 0;
+ skip = FALSE;
if (lim_p && lim <= i) break;
}
}
else if (ascii_isspace(c)) {
mrb_ary_push(mrb, result, mrb_str_subseq(mrb, str, beg, end-beg));
mrb_gc_arena_restore(mrb, ai);
- skip = 1;
+ skip = TRUE;
beg = ptr - bptr;
if (lim_p) ++i;
}