summaryrefslogtreecommitdiff
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
commit8729368f14b282cb64a7848ee515e0d4240ee57a (patch)
tree6827e4f4203792782c4d68f6a6b4a2f90a844910 /complex.c
parentb7e026fb3fffdb05b6f6915a58049c7abf1b572a (diff)
* 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
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 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