aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index 6a6859b1f2..06bb26caa3 100644
--- a/string.c
+++ b/string.c
@@ -5148,7 +5148,7 @@ rb_str_split_m(int argc, VALUE *argv, VALUE str)
spat = rb_reg_regcomp(spat);
split_type = regexp;
}
- else if (rb_enc_mbminlen(enc2) == 1) {
+ else if (rb_enc_asciicompat(enc2) == 1) {
if (RSTRING_LEN(spat) == 1 && RSTRING_PTR(spat)[0] == ' '){
split_type = awk;
}
@@ -5224,7 +5224,7 @@ rb_str_split_m(int argc, VALUE *argv, VALUE str)
ptr = t;
continue;
}
- rb_ary_push(result, rb_str_substr(str, ptr - RSTRING_PTR(str), end));
+ rb_ary_push(result, rb_str_subseq(str, ptr - RSTRING_PTR(str), end));
ptr += end + slen;
if (!NIL_P(limit) && lim <= ++i) break;
}