1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fixed previous commit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tadf 2008-09-21 12:32:33 +00:00
parent cbae6d0911
commit 83b381752e

View file

@ -692,7 +692,7 @@ nucomp_expt(VALUE self, VALUE other)
z = x;
n = f_sub(other, ONE);
while (!f_zero_p(n)) {
while (f_nonzero_p(n)) {
VALUE a;
while (a = f_divmod(n, TWO),
@ -994,7 +994,7 @@ nucomp_to_i(VALUE self)
{
get_dat1(self);
if (k_inexact_p(dat->imag) || !f_zero_p(dat->imag)) {
if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
VALUE s = f_to_s(self);
rb_raise(rb_eRangeError, "can't convert %s into Integer",
StringValuePtr(s));
@ -1007,7 +1007,7 @@ nucomp_to_f(VALUE self)
{
get_dat1(self);
if (k_inexact_p(dat->imag) || !f_zero_p(dat->imag)) {
if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
VALUE s = f_to_s(self);
rb_raise(rb_eRangeError, "can't convert %s into Float",
StringValuePtr(s));
@ -1020,7 +1020,7 @@ nucomp_to_r(VALUE self)
{
get_dat1(self);
if (k_inexact_p(dat->imag) || !f_zero_p(dat->imag)) {
if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
VALUE s = f_to_s(self);
rb_raise(rb_eRangeError, "can't convert %s into Rational",
StringValuePtr(s));