summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-16 10:25:24 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-16 10:25:24 +0000
commitc17cfbd981eb234ce4a47df2eab0c739cb312f44 (patch)
treefa8939fab5a293b1ea801973230fff503a00b12e
parentf4b092b473cd09b8217946c2a737f91d007ecf23 (diff)
merges r20653 and r20667 from trunk into ruby_1_9_1.
* complex.c, rational.c: do not use RUBY_VERSION_CODE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--complex.c11
-rw-r--r--rational.c11
3 files changed, 16 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 40b56621aa..94f9c0ddd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Dec 12 22:12:46 2008 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * complex.c, rational.c: do not use RUBY_VERSION_CODE.
+
+Fri Dec 12 10:20:55 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * complex.c, rational.c: do not use RUBY_VERSION_CODE.
+
Tue Dec 16 12:41:52 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* configure.in (OBJDUMP, OBJCOPY):
diff --git a/complex.c b/complex.c
index 6dc09526d5..0549bab87a 100644
--- a/complex.c
+++ b/complex.c
@@ -320,20 +320,17 @@ f_complex_new_bang2(VALUE klass, VALUE x, VALUE y)
return nucomp_s_new_internal(klass, x, y);
}
-#ifndef RUBY_VERSION_CODE
-#include "version.h"
-#endif
-
-#if RUBY_VERSION_CODE < 200
#define CANON
-#endif
-
#ifdef CANON
static int canonicalization = 0;
void
nucomp_canonicalize(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
diff --git a/rational.c b/rational.c
index 82628594d3..4b6e2ea0ca 100644
--- a/rational.c
+++ b/rational.c
@@ -377,20 +377,17 @@ f_rational_new_bang2(VALUE klass, VALUE x, VALUE y)
return nurat_s_new_internal(klass, x, y);
}
-#ifndef RUBY_VERSION_CODE
-#include "version.h"
-#endif
-
-#if RUBY_VERSION_CODE < 200
#define CANON
-#endif
-
#ifdef CANON
static int canonicalization = 0;
void
nurat_canonicalize(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