ruby-changes:9249
From: yugui <ko1@a...>
Date: Tue, 16 Dec 2008 19:30:48 +0900 (JST)
Subject: [ruby-changes:9249] Ruby:r20786 (ruby_1_9_1): merges r20653 and r20667 from trunk into ruby_1_9_1.
yugui 2008-12-16 19:25:24 +0900 (Tue, 16 Dec 2008) New Revision: 20786 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20786 Log: merges r20653 and r20667 from trunk into ruby_1_9_1. * complex.c, rational.c: do not use RUBY_VERSION_CODE. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/complex.c branches/ruby_1_9_1/rational.c Index: ruby_1_9_1/complex.c =================================================================== --- ruby_1_9_1/complex.c (revision 20785) +++ ruby_1_9_1/complex.c (revision 20786) @@ -320,20 +320,17 @@ 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 Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 20785) +++ ruby_1_9_1/ChangeLog (revision 20786) @@ -1,3 +1,11 @@ +Fri Dec 12 22:12:46 2008 Tadayoshi Funaba <tadf@d...> + + * complex.c, rational.c: do not use RUBY_VERSION_CODE. + +Fri Dec 12 10:20:55 2008 Nobuyoshi Nakada <nobu@r...> + + * complex.c, rational.c: do not use RUBY_VERSION_CODE. + Tue Dec 16 12:41:52 2008 Yuki Sonoda (Yugui) <yugui@y...> * configure.in (OBJDUMP, OBJCOPY): Index: ruby_1_9_1/rational.c =================================================================== --- ruby_1_9_1/rational.c (revision 20785) +++ ruby_1_9_1/rational.c (revision 20786) @@ -377,20 +377,17 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/