зеркало из https://github.com/github/ruby.git
* bignum.c (big_shift): fix a bug that caused infinite loop when
left shifting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
1363591ac2
Коммит
c06bb92b86
|
@ -1,3 +1,8 @@
|
|||
Tue Jan 22 00:30:08 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* bignum.c (big_shift): fix a bug that caused infinite loop when
|
||||
left shifting.
|
||||
|
||||
Mon Jan 21 20:09:38 2008 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* lib/date.rb (marshal_load): initialize the cache.
|
||||
|
|
2
bignum.c
2
bignum.c
|
@ -1851,7 +1851,7 @@ static VALUE big_rshift(VALUE, unsigned long);
|
|||
static VALUE big_shift(VALUE x, int n)
|
||||
{
|
||||
if (n < 0)
|
||||
return big_lshift(x, (unsigned int)n);
|
||||
return big_lshift(x, (unsigned int)-n);
|
||||
else if (n > 0)
|
||||
return big_rshift(x, (unsigned int)n);
|
||||
return x;
|
||||
|
|
Загрузка…
Ссылка в новой задаче