diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-11 06:47:09 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-11 06:47:09 +0000 |
commit | 1db0db3ba0b90787e9db8c2dc72bfed879d5ee20 (patch) | |
tree | a0b9f5b623b16f9436f0a687782c2480b32e93ce /eval.c | |
parent | 4bacdc1e46ab788f9285ccd8eccd2776260f9528 (diff) |
* 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
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); } |