From 5937c29281d9bf51ca85b79c8f3dea204909a073 Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Tue, 12 Jun 2012 12:29:20 +0900 Subject: s.split(nil) should work like s.split() --- src/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 { -- cgit v1.2.3