diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-07 12:04:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-07 12:04:43 +0000 |
commit | f63158340c244130ca4f2bfda933886741e23dfe (patch) | |
tree | e4089377558073d53e94c8fb2fc00c12f21ee909 /complex.c | |
parent | b9fa88ba61c0d52fd0f3435e3c3f550c5203160b (diff) | |
download | ruby-f63158340c244130ca4f2bfda933886741e23dfe.tar.gz |
complex.c: check type
* complex.c (m_cos, m_sin): determine the type by the internal
type, not by a method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r-- | complex.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |