mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (bignorm): x may not be a bignum. [ruby-dev:28367]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3647fb485c
commit
145b7e1b8b
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Wed Feb 22 14:21:03 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* bignum.c (bignorm): x may not be a bignum. [ruby-dev:28367]
|
||||||
|
|
||||||
Wed Feb 22 09:22:40 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Wed Feb 22 09:22:40 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c (proc_alloc): add proper check for creation of a lambda
|
* eval.c (proc_alloc): add proper check for creation of a lambda
|
||||||
|
|
5
bignum.c
5
bignum.c
|
@ -92,7 +92,10 @@ rb_big_2comp(VALUE x) /* get 2's complement */
|
||||||
static VALUE
|
static VALUE
|
||||||
bignorm(VALUE x)
|
bignorm(VALUE x)
|
||||||
{
|
{
|
||||||
if (!FIXNUM_P(x)) {
|
if (FIXNUM_P(x)) {
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
else if (TYPE(x) == T_BIGNUM) {
|
||||||
long len = RBIGNUM(x)->len;
|
long len = RBIGNUM(x)->len;
|
||||||
BDIGIT *ds = BDIGITS(x);
|
BDIGIT *ds = BDIGITS(x);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue