* hash.c (rb_hash_flatten): do not flatten recursively by default.
[ruby-dev:33603] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fe923029df
commit
acc1a53744
@ -1,3 +1,8 @@
|
|||||||
|
Wed Feb 6 01:47:39 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* hash.c (rb_hash_flatten): do not flatten recursively by default.
|
||||||
|
[ruby-dev:33603]
|
||||||
|
|
||||||
Wed Feb 6 00:50:19 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
Wed Feb 6 00:50:19 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* insns.def (adjuststack): never use INC_SP with minus value because
|
* insns.def (adjuststack): never use INC_SP with minus value because
|
||||||
|
5
hash.c
5
hash.c
@ -1673,6 +1673,11 @@ rb_hash_flatten(int argc, VALUE *argv, VALUE hash)
|
|||||||
VALUE ary;
|
VALUE ary;
|
||||||
|
|
||||||
ary = rb_hash_to_a(hash);
|
ary = rb_hash_to_a(hash);
|
||||||
|
if (argc == 0) {
|
||||||
|
argc = 1;
|
||||||
|
tmp = INT2FIX(1);
|
||||||
|
argv = &tmp;
|
||||||
|
}
|
||||||
rb_funcall2(ary, rb_intern("flatten!"), argc, argv);
|
rb_funcall2(ary, rb_intern("flatten!"), argc, argv);
|
||||||
return ary;
|
return ary;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user