summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-06-12 12:29:20 +0900
committerYukihiro Matsumoto <[email protected]>2012-06-12 12:29:20 +0900
commit5937c29281d9bf51ca85b79c8f3dea204909a073 (patch)
treee66e80f5c9bb157ab6d1def59ebe68583fc1302d /src/string.c
parentb32e586099d8a59bd497031f27e9763b028c0bad (diff)
downloadmruby-5937c29281d9bf51ca85b79c8f3dea204909a073.tar.gz
mruby-5937c29281d9bf51ca85b79c8f3dea204909a073.zip
s.split(nil) should work like s.split()
Diffstat (limited to 'src/string.c')
-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 {