mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (bignorm): avoid segmentation. a patch from Hiroyuki
Ito <ZXB01226@nifty.com>. [ruby-list:43012] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7505c10b73
commit
e3adeba5b2
2 changed files with 9 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
Fri Nov 24 10:17:51 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* bignum.c (bignorm): avoid segmentation. a patch from Hiroyuki
|
||||
Ito <ZXB01226@nifty.com>. [ruby-list:43012]
|
||||
|
||||
Thu Nov 23 10:38:40 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_mod_define_method): set implicit visibility only when
|
||||
|
|
|
|||
5
bignum.c
5
bignum.c
|
|
@ -99,7 +99,10 @@ static VALUE
|
|||
bignorm(x)
|
||||
VALUE x;
|
||||
{
|
||||
if (!FIXNUM_P(x)) {
|
||||
if (FIXNUM_P(x)) {
|
||||
return x;
|
||||
}
|
||||
else if (TYPE(x) == T_BIGNUM) {
|
||||
long len = RBIGNUM(x)->len;
|
||||
BDIGIT *ds = BDIGITS(x);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue