* bignum.c (rb_int2big): use SIGNED_VALUE. [ruby-dev:29019]

* bignum.c (rb_int2inum, rb_uint2inum): use VALUE sized integer.

* bignum.c (rb_big2long, rb_big2ulong): ditto.

* numeric.c (rb_num2long, rb_num2ulong): ditto.

* numeric.c (check_int, check_uint): ditto.

* bignum.c (rb_quad_pack): typo fixed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2006-07-11 06:47:09 +00:00
parent 4bacdc1e46
commit 1db0db3ba0
6 changed files with 65 additions and 42 deletions

7
eval.c
View file

@ -8555,10 +8555,13 @@ VALUE
rb_proc_yield(int argc, VALUE *argv, VALUE proc)
{
switch (argc) {
case 1:
if (!NIL_P(argv[0])) {
return proc_invoke(proc, argv[0], Qundef, 0, 0);
}
/* fall through */
case 0:
return proc_invoke(proc, Qundef, Qundef, 0, 0);
case 1:
return proc_invoke(proc, argv[0], Qundef, 0, 0);
default:
return proc_invoke(proc, rb_ary_new4(argc, argv), Qundef, 0, 0);
}