summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-19 11:36:56 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-19 11:36:56 +0000
commitf85491da545cb24a302627932890be446180f64b (patch)
treede62dda88f11a3c2368e41bc52f4039008304889 /complex.c
parent2458172de888472f276371ec02e25744b08b5a30 (diff)
merges r20683 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@20874 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 31b3c48251..390658b487 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