summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/complex.c b/complex.c
index 51918c7f3c..eb9ceaeac6 100644
--- a/complex.c
+++ b/complex.c
@@ -1295,7 +1295,7 @@ nucomp_to_i(VALUE self)
{
get_dat1(self);
- if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
+ if (f_nonzero_p(dat->imag)) {
VALUE s = f_to_s(self);
rb_raise(rb_eRangeError, "can't convert %s into Integer",
StringValuePtr(s));
@@ -1314,7 +1314,7 @@ nucomp_to_f(VALUE self)
{
get_dat1(self);
- if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
+ if (f_nonzero_p(dat->imag)) {
VALUE s = f_to_s(self);
rb_raise(rb_eRangeError, "can't convert %s into Float",
StringValuePtr(s));
@@ -1333,7 +1333,7 @@ nucomp_to_r(VALUE self)
{
get_dat1(self);
- if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
+ if (f_nonzero_p(dat->imag)) {
VALUE s = f_to_s(self);
rb_raise(rb_eRangeError, "can't convert %s into Rational",
StringValuePtr(s));