summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c
index 172b8422c..fae3392cf 100644
--- a/src/string.c
+++ b/src/string.c
@@ -2139,7 +2139,7 @@ mrb_str_split_m(mrb_state *mrb, mrb_value str)
i = 1;
}
- if (argc == 0) {
+ if (argc == 0 || mrb_nil_p(spat)) {
split_type = awk;
}
else {