diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-24 05:18:47 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-24 05:18:47 +0000 |
| commit | 242d1879f3105377fe1153a21043bebbbaa7b208 (patch) | |
| tree | 425980c3ebfb78d38067b3b01f2df97a9dc0853d /string.c | |
| parent | 3e278b0745c94b5bba04c680778b21b6a0d785d9 (diff) | |
| download | ruby-242d1879f3105377fe1153a21043bebbbaa7b208.tar.gz ruby-242d1879f3105377fe1153a21043bebbbaa7b208.tar.xz ruby-242d1879f3105377fe1153a21043bebbbaa7b208.zip | |
* eval.c (thgroup_add): no warning for terminated threads.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2557,7 +2557,11 @@ rb_str_split_m(argc, argv, str) if (rb_scan_args(argc, argv, "02", &spat, &limit) == 2) { lim = NUM2INT(limit); if (lim <= 0) limit = Qnil; - else if (lim == 1) return rb_ary_new3(1, str); + else if (lim == 1) { + if (RSTRING(str)->len == 0) + return rb_ary_new2(0); + return rb_ary_new3(1, str); + } i = 1; } |
