diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-28 13:27:48 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-28 13:27:48 +0000 |
commit | 268432c51dae147cebc456aea8ca05842aa78c9a (patch) | |
tree | de8fff4d6490579ace7f2d1092ad08970c5b64ae /rational.c | |
parent | faea8893f82230eb0e2c5759361138fa20af7a9a (diff) | |
download | ruby-268432c51dae147cebc456aea8ca05842aa78c9a.tar.gz |
* complex.c (nucomp_expt): convert to a float when the given power
is a bignum.
* rational.c (nurat_expt): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r-- | rational.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rational.c b/rational.c index 90025fad21..8b28ac5ad1 100644 --- a/rational.c +++ b/rational.c @@ -902,7 +902,6 @@ nurat_expt(VALUE self, VALUE other) switch (TYPE(other)) { case T_FIXNUM: - case T_BIGNUM: { VALUE num, den; @@ -924,6 +923,8 @@ nurat_expt(VALUE self, VALUE other) } return f_rational_new2(CLASS_OF(self), num, den); } + case T_BIGNUM: + rb_warn("in a**b, b may be too big"); case T_FLOAT: case T_RATIONAL: return rb_fexpt(f_to_f(self), other); |