summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-13 01:01:56 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-13 01:01:56 +0000
commite886f46b77d65a4d5ac1e3c8906fa78d5ad8b615 (patch)
tree8b1d2325940a78b1580366e6f2e72ed0e045068a /complex.c
parent2dab996c6072f86c41c624dbdd584f5d2de39438 (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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/complex.c b/complex.c
index f69c976ac0..6dc09526d5 100644
--- a/complex.c
+++ b/complex.c
@@ -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