summaryrefslogtreecommitdiff
path: root/rational.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 /rational.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 'rational.c')
-rw-r--r--rational.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/rational.c b/rational.c
index ba41413cbe..0dc445dfba 100644
--- a/rational.c
+++ b/rational.c
@@ -377,17 +377,16 @@ f_rational_new_bang2(VALUE klass, VALUE x, VALUE y)
return nurat_s_new_internal(klass, x, y);
}
+#ifdef CANONICALIZATION_FOR_MATHN
#define CANON
+#endif
+
#ifdef CANON
static int canonicalization = 0;
void
-nurat_canonicalize(int f)
+nurat_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
@@ -1543,11 +1542,7 @@ Init_Rational(void)
rb_define_method(rb_cRational, "div", nurat_idiv, 1);
-#ifndef NUBY
-#define NUBY 0
-#endif
-
-#if NUBY
+#if 0 /* NUBY */
rb_define_method(rb_cRational, "//", nurat_idiv, 1);
#endif