summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-05-05 21:34:59 +0900
committerGitHub <[email protected]>2017-05-05 21:34:59 +0900
commitef305305b43528d94b162078c421a0590ba1c438 (patch)
tree32f72c4307440efa0166d6d013b386f0c1fce875 /src/string.c
parent964a02f1fa1eee2a977cada9f95315e4f8ce5e7a (diff)
parent8cba9a9e42989baafa7349dbfc05b1a9eb944a16 (diff)
downloadmruby-ef305305b43528d94b162078c421a0590ba1c438.tar.gz
mruby-ef305305b43528d94b162078c421a0590ba1c438.zip
Merge pull request #3647 from ksss/split
Adjust to the optimum type
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c
index f24ed3900..ba948b83b 100644
--- a/src/string.c
+++ b/src/string.c
@@ -1954,10 +1954,11 @@ mrb_str_split_m(mrb_state *mrb, mrb_value str)
int argc;
mrb_value spat = mrb_nil_value();
enum {awk, string, regexp} split_type = string;
- long i = 0, lim_p;
+ mrb_int i = 0;
mrb_int beg;
mrb_int end;
mrb_int lim = 0;
+ mrb_bool lim_p;
mrb_value result, tmp;
argc = mrb_get_args(mrb, "|oi", &spat, &lim);