Use global defines for `Rational` and `Complex`.
MODIFY
mrbgems/mruby-complex/mrbgem.rake
mrbgems/mruby-complex/mrbgem.rake
@@ -2,6 +2,6 @@ MRuby::Gem::Specification.new('mruby-complex') do |spec|
spec.license = 'MIT'
spec.author = 'mruby developers'
spec.summary = 'Complex class'
- spec.build.cc.defines << "MRB_USE_COMPLEX"
+ spec.build.defines << "MRB_USE_COMPLEX"
spec.add_dependency 'mruby-math', core: 'mruby-math'
end

MODIFY
mrbgems/mruby-rational/mrbgem.rake
mrbgems/mruby-rational/mrbgem.rake
@@ -2,5 +2,5 @@ MRuby::Gem::Specification.new('mruby-rational') do |spec|
spec.license = 'MIT'
spec.author = 'mruby developers'
spec.summary = 'Rational class'
- spec.build.cc.defines << "MRB_USE_RATIONAL"
+ spec.build.defines << "MRB_USE_RATIONAL"
end

MODIFY
mrbgems/mruby-rational/src/rational.c
mrbgems/mruby-rational/src/rational.c
@@ -379,6 +379,7 @@ mrb_rational_eq(mrb_state *mrb, mrb_value x, mrb_value y)
}
return a == b;
}
+
#ifdef MRB_USE_COMPLEX
case MRB_TT_COMPLEX:
{

Use global defines for `Rational` and `Complex`.