summaryrefslogtreecommitdiffstats
path: root/complex.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-12 23:40:55 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-12 23:40:55 +0000
commit36ca5d708756108cb2004fe67b0b85f43811cb8f (patch)
tree6827e4f4203792782c4d68f6a6b4a2f90a844910 /complex.c
parentd7cbf727c19d813a27bc69aac807277362fcf5e8 (diff)
downloadruby-36ca5d708756108cb2004fe67b0b85f43811cb8f.tar.gz
ruby-36ca5d708756108cb2004fe67b0b85f43811cb8f.tar.xz
ruby-36ca5d708756108cb2004fe67b0b85f43811cb8f.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@20683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/complex.c b/complex.c
index 0549bab87..b6cb58cdf 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