diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-21 14:47:11 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-21 14:47:11 +0000 |
| commit | 0d8d0d9bd447df371555c3dcd933566f7bef264d (patch) | |
| tree | 5deddc1f57b83e5fa7c089d9c179a0093cf90676 /array.c | |
| parent | 08fc80ffe54d749c3657457eee7f23e0bbc471bc (diff) | |
merges r23361 from trunk into ruby_1_9_1.
--
* array.c (rb_ary_flatten_bang): returns nil if nothing changed.
a patch from Marc-Andre Lafortune in [ruby-core:23382].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
| -rw-r--r-- | array.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3190,7 +3190,7 @@ rb_ary_flatten_bang(int argc, VALUE *argv, VALUE ary) rb_scan_args(argc, argv, "01", &lv); if (!NIL_P(lv)) level = NUM2INT(lv); - if (level == 0) return ary; + if (level == 0) return Qnil; result = flatten(ary, level, &mod); if (mod == 0) return Qnil; |
