summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-08 07:02:42 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-08 07:02:42 (GMT)
commit8953eee69f52d4f7f32fa1cf7f917bc6c3cbfebe (patch)
tree5cffac03244dc463322bbb6a8f283ea14b568b36 /rational.c
parent04976ab678515fa7ee5a95212498acbb287292ba (diff)
* 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rational.c b/rational.c
index d70dfd4..b36ce29 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