summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-rational
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-03-22 10:59:35 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-03-22 10:59:35 +0900
commit68cf8346cd250c1a47a807f19e1289910f55ecb7 (patch)
tree6cef000fcd434bcbf8dc3aa74dc88de01301fc4c /mrbgems/mruby-rational
parent384865997de9a994199da665f352eb83f66b8506 (diff)
downloadmruby-68cf8346cd250c1a47a807f19e1289910f55ecb7.tar.gz
mruby-68cf8346cd250c1a47a807f19e1289910f55ecb7.zip
Use global defines for `Rational` and `Complex`.
Diffstat (limited to 'mrbgems/mruby-rational')
-rw-r--r--mrbgems/mruby-rational/mrbgem.rake2
-rw-r--r--mrbgems/mruby-rational/src/rational.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/mrbgems/mruby-rational/mrbgem.rake b/mrbgems/mruby-rational/mrbgem.rake
index 358fb838a..ab5dc5fd1 100644
--- a/mrbgems/mruby-rational/mrbgem.rake
+++ b/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
diff --git a/mrbgems/mruby-rational/src/rational.c b/mrbgems/mruby-rational/src/rational.c
index d046864c7..9d819d0f8 100644
--- a/mrbgems/mruby-rational/src/rational.c
+++ b/mrbgems/mruby-rational/src/rational.c
@@ -379,9 +379,10 @@ mrb_rational_eq(mrb_state *mrb, mrb_value x, mrb_value y)
}
return a == b;
}
+
#ifdef MRB_USE_COMPLEX
case MRB_TT_COMPLEX:
- {
+ {
mrb_bool mrb_complex_eq(mrb_state *mrb, mrb_value, mrb_value);
return mrb_complex_eq(mrb, y, x);
}