diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-13 01:01:56 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-13 01:01:56 +0000 |
| commit | 808baa566a93335663323bd192f1f2d5cc0f0ec2 (patch) | |
| tree | 8b1d2325940a78b1580366e6f2e72ed0e045068a | |
| parent | 97e7c509b7569c4f37992816fd2493d481a9d39f (diff) | |
merges r20612 and r20614 from trunk into ruby_1_9_1.
* complex.c: avoided warnings on cpp. [ruby-dev:37344]
* rational.c: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | complex.c | 8 | ||||
| -rw-r--r-- | rational.c | 10 |
3 files changed, 24 insertions, 0 deletions
@@ -1,3 +1,9 @@ +Wed Dec 10 23:58:56 2008 Tadayoshi Funaba <tadf@dotrb.org> + + * complex.c: avoided warnings on cpp. [ruby-dev:37344] + + * rational.c: ditto. + Wed Dec 10 12:46:52 2008 Akinori MUSHA <knu@iDaemons.org> * enumerator.c (enumerator_next): Fix a typo: s/rewinded/rewound/. @@ -320,6 +320,10 @@ 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 @@ -1427,6 +1431,10 @@ Init_Complex(void) rb_undef_method(rb_cComplex, "step"); rb_undef_method(rb_cComplex, "truncate"); +#ifndef NUBY +#define NUBY 0 +#endif + #if NUBY rb_undef_method(rb_cComplex, "//"); #endif diff --git a/rational.c b/rational.c index 3c29aab97..82628594d 100644 --- a/rational.c +++ b/rational.c @@ -377,6 +377,10 @@ 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 @@ -1541,9 +1545,15 @@ Init_Rational(void) rb_define_method(rb_cRational, "coerce", nurat_coerce, 1); rb_define_method(rb_cRational, "div", nurat_idiv, 1); + +#ifndef NUBY +#define NUBY 0 +#endif + #if NUBY rb_define_method(rb_cRational, "//", nurat_idiv, 1); #endif + rb_define_method(rb_cRational, "modulo", nurat_mod, 1); rb_define_method(rb_cRational, "%", nurat_mod, 1); rb_define_method(rb_cRational, "divmod", nurat_divmod, 1); |
