зеркало из https://github.com/github/ruby.git
* array.c (rb_ary_flatten_bang): check argument if valid
integer. [ruby-dev:31197] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b53224b493
Коммит
f64a557efd
|
@ -1,3 +1,8 @@
|
|||
Fri Jul 13 10:33:29 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* array.c (rb_ary_flatten_bang): check argument if valid
|
||||
integer. [ruby-dev:31197]
|
||||
|
||||
Fri Jul 13 10:10:46 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (link_command, cc_command, cpp_command): do not expand
|
||||
|
|
3
array.c
3
array.c
|
@ -1139,7 +1139,6 @@ each_i(VALUE ary)
|
|||
VALUE
|
||||
rb_ary_each(VALUE ary)
|
||||
{
|
||||
VALUE val;
|
||||
RETURN_ENUMERATOR(ary, 0, 0);
|
||||
ITERATE(each_i, ary);
|
||||
return ary;
|
||||
|
@ -2842,7 +2841,7 @@ rb_ary_flatten_bang(int argc, VALUE *argv, VALUE ary)
|
|||
VALUE lv;
|
||||
|
||||
rb_scan_args(argc, argv, "01", &lv);
|
||||
if (!NIL_P(lv)) level = FIX2INT(lv);
|
||||
if (!NIL_P(lv)) level = NUM2INT(lv);
|
||||
if (level == 0) return ary;
|
||||
while (i<RARRAY_LEN(ary)) {
|
||||
VALUE ary2 = RARRAY_PTR(ary)[i];
|
||||
|
|
Загрузка…
Ссылка в новой задаче