From 8729368f14b282cb64a7848ee515e0d4240ee57a Mon Sep 17 00:00:00 2001 From: tadf Date: Fri, 12 Dec 2008 23:40:55 +0000 Subject: * complex.c (nucomp_canonicalization): renamed. * ext/math/complex.c: followed the above change. * rational.c (nurat_canonicalization): renamed. * ext/math/rational.c: followed the above change. * configure.in: defines a new macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- complex.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'complex.c') diff --git a/complex.c b/complex.c index 0549bab87a..b6cb58cdfd 100644 --- a/complex.c +++ b/complex.c @@ -320,17 +320,16 @@ f_complex_new_bang2(VALUE klass, VALUE x, VALUE y) return nucomp_s_new_internal(klass, x, y); } +#ifdef CANONICALIZATION_FOR_MATHN #define CANON +#endif + #ifdef CANON static int canonicalization = 0; void -nucomp_canonicalize(int f) +nucomp_canonicalization(int f) { - VALUE s = rb_const_get(rb_cObject, rb_intern("RUBY_VERSION")); - Check_Type(s, T_STRING); - if (rb_str_cmp(s, rb_str_new2("2.0.0")) >= 0) - rb_bug("no longer provide canonicalization"); canonicalization = f; } #endif @@ -1428,11 +1427,7 @@ Init_Complex(void) rb_undef_method(rb_cComplex, "step"); rb_undef_method(rb_cComplex, "truncate"); -#ifndef NUBY -#define NUBY 0 -#endif - -#if NUBY +#if 0 /* NUBY */ rb_undef_method(rb_cComplex, "//"); #endif -- cgit v1.2.3