diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-08 07:02:42 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-08 07:02:42 +0000 |
commit | 8953eee69f52d4f7f32fa1cf7f917bc6c3cbfebe (patch) | |
tree | 5cffac03244dc463322bbb6a8f283ea14b568b36 /rational.c | |
parent | 04976ab678515fa7ee5a95212498acbb287292ba (diff) | |
download | ruby-8953eee69f52d4f7f32fa1cf7f917bc6c3cbfebe.tar.gz |
* rational.c (f_gcd): Relax the condition to use GMP.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r-- | rational.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rational.c b/rational.c index d70dfd41ab..b36ce29c1d 100644 --- a/rational.c +++ b/rational.c @@ -379,7 +379,7 @@ f_gcd(VALUE x, VALUE y) if (TYPE(x) == T_BIGNUM && TYPE(y) == T_BIGNUM) { long xn = RBIGNUM_LEN(x); long yn = RBIGNUM_LEN(y); - if (GMP_GCD_DIGITS <= xn && GMP_GCD_DIGITS <= yn) + if (GMP_GCD_DIGITS <= xn || GMP_GCD_DIGITS <= yn) return rb_gcd_gmp(x, y); } #endif |