From 932e916b9e340d3ae52bac2eb57567208dc21d4f Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 17 May 2015 06:01:47 +0000 Subject: numeric.c: Numeric#positive? and Numeric#negative? * numeric.c (num_positive_p, num_negative_p): add methods Numeric#positive? and Numeric#negative?. [ruby-core:69173] [Feature #11151] * numeric.c (flo_positive_p, flo_negative_p): specialiazed functions for Float. * complex.c (Init_Complex): Complex do not have positive? and negative? methods git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- complex.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'complex.c') diff --git a/complex.c b/complex.c index d1cb207c3d..365fb7ad17 100644 --- a/complex.c +++ b/complex.c @@ -2222,6 +2222,9 @@ Init_Complex(void) rb_define_method(rb_cComplex, "to_s", nucomp_to_s, 0); rb_define_method(rb_cComplex, "inspect", nucomp_inspect, 0); + rb_undef_method(rb_cComplex, "positive?"); + rb_undef_method(rb_cComplex, "negative?"); + rb_define_private_method(rb_cComplex, "marshal_dump", nucomp_marshal_dump, 0); compat = rb_define_class_under(rb_cComplex, "compatible", rb_cObject); /* :nodoc: */ rb_define_private_method(compat, "marshal_load", nucomp_marshal_load, 1); -- cgit v1.2.3