* complex.c, rational.c: do not use RUBY_VERSION_CODE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
02a37bee67
commit
75fbac3b0d
@ -1,3 +1,7 @@
|
|||||||
|
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 21:41:36 2008 TAKAO Kouji <kouji@takao7.net>
|
Fri Dec 12 21:41:36 2008 TAKAO Kouji <kouji@takao7.net>
|
||||||
|
|
||||||
* ext/readline/readline.c: r20662 reverted.
|
* ext/readline/readline.c: r20662 reverted.
|
||||||
|
@ -320,18 +320,17 @@ f_complex_new_bang2(VALUE klass, VALUE x, VALUE y)
|
|||||||
return nucomp_s_new_internal(klass, x, y);
|
return nucomp_s_new_internal(klass, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RUBY_VERSION_CODE 0
|
|
||||||
|
|
||||||
#if RUBY_VERSION_CODE < 200
|
|
||||||
#define CANON
|
#define CANON
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CANON
|
#ifdef CANON
|
||||||
static int canonicalization = 0;
|
static int canonicalization = 0;
|
||||||
|
|
||||||
void
|
void
|
||||||
nucomp_canonicalize(int f)
|
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;
|
canonicalization = f;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -377,18 +377,17 @@ f_rational_new_bang2(VALUE klass, VALUE x, VALUE y)
|
|||||||
return nurat_s_new_internal(klass, x, y);
|
return nurat_s_new_internal(klass, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RUBY_VERSION_CODE 0
|
|
||||||
|
|
||||||
#if RUBY_VERSION_CODE < 200
|
|
||||||
#define CANON
|
#define CANON
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CANON
|
#ifdef CANON
|
||||||
static int canonicalization = 0;
|
static int canonicalization = 0;
|
||||||
|
|
||||||
void
|
void
|
||||||
nurat_canonicalize(int f)
|
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;
|
canonicalization = f;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user