diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-12 13:13:44 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-12 13:13:44 +0000 |
commit | deb225d2c632c60576a4abbb6dde0a818e531248 (patch) | |
tree | 77fbb6e5bcb2ff40de4c04636dd995a6bc7c35b4 /rational.c | |
parent | f0920e3ea45f25adea6a1378b7491399e85fd0f4 (diff) | |
download | ruby-deb225d2c632c60576a4abbb6dde0a818e531248.tar.gz ruby-deb225d2c632c60576a4abbb6dde0a818e531248.tar.xz ruby-deb225d2c632c60576a4abbb6dde0a818e531248.zip |
* complex.c, rational.c: do not use RUBY_VERSION_CODE.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r-- | rational.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rational.c b/rational.c index ac28822bd..4b6e2ea0c 100644 --- a/rational.c +++ b/rational.c @@ -377,18 +377,17 @@ f_rational_new_bang2(VALUE klass, VALUE x, VALUE y) return nurat_s_new_internal(klass, x, y); } -#define RUBY_VERSION_CODE 0 - -#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 |