diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-24 01:51:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-24 01:51:10 +0000 |
commit | c4e8455ff167cfb80d8cbf3cfb7787938b6d4077 (patch) | |
tree | 261fdacbc12e9ee5274a745e1ecc70b9304ce293 /complex.c | |
parent | ab3611e2ccd279d70bf0a261b4fe01444fdd4bb6 (diff) | |
download | ruby-c4e8455ff167cfb80d8cbf3cfb7787938b6d4077.tar.gz |
complex.c: undefine Comparable methods
* complex.c (Init_Complex): undefine methods inherited from
Comparable, because Complex does not have <=> method.
[Bug #12866]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r-- | complex.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -2227,14 +2227,9 @@ Init_Complex(void) rb_define_global_function("Complex", nucomp_f_complex, -1); + rb_undef_methods_from(rb_cComplex, rb_mComparable); rb_undef_method(rb_cComplex, "%"); - rb_undef_method(rb_cComplex, "<"); - rb_undef_method(rb_cComplex, "<="); rb_undef_method(rb_cComplex, "<=>"); - rb_undef_method(rb_cComplex, ">"); - rb_undef_method(rb_cComplex, ">="); - rb_undef_method(rb_cComplex, "between?"); - rb_undef_method(rb_cComplex, "clamp"); rb_undef_method(rb_cComplex, "div"); rb_undef_method(rb_cComplex, "divmod"); rb_undef_method(rb_cComplex, "floor"); |