summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/complex.c b/complex.c
index 6b54d44ba2..43f2964545 100644
--- a/complex.c
+++ b/complex.c
@@ -486,7 +486,7 @@ imp1(sinh)
static VALUE
m_cos(VALUE x)
{
- if (f_real_p(x))
+ if (!RB_TYPE_P(x, T_COMPLEX))
return m_cos_bang(x);
{
get_dat1(x);
@@ -501,7 +501,7 @@ m_cos(VALUE x)
static VALUE
m_sin(VALUE x)
{
- if (f_real_p(x))
+ if (!RB_TYPE_P(x, T_COMPLEX))
return m_sin_bang(x);
{
get_dat1(x);