summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-25 02:26:22 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-25 02:26:22 +0000
commitc942417791e74428fce1ed2a722c679fca5f131e (patch)
tree069d9468528c3ecea6b0a074c62f7be9477101f9 /rational.c
parentd3f73f45d8342e37a814eeb8c98e1d04f451a3b4 (diff)
* rational.c (nurat_expt): use Float#** when Rational ** Float.
This fixes Rational(3,1)**3.0=>26.99999999999999 on FreeBSD. * complex.c (rb_fexpt): removed. Note that this function is not static but is private. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/rational.c b/rational.c
index 43917bc..65d3cf4 100644
--- a/rational.c
+++ b/rational.c
@@ -901,8 +901,6 @@ nurat_fdiv(VALUE self, VALUE other)
return f_to_f(f_div(self, other));
}
-extern VALUE rb_fexpt(VALUE x, VALUE y);
-
/*
* call-seq:
* rat ** numeric -> numeric_result
@@ -959,7 +957,7 @@ nurat_expt(VALUE self, VALUE other)
/* fall through */
case T_FLOAT:
case T_RATIONAL:
- return rb_fexpt(f_to_f(self), other);
+ return f_expt(f_to_f(self), other);
default:
return rb_num_coerce_bin(self, other, id_expt);
}