summaryrefslogtreecommitdiffhomepage
path: root/src/array.c
diff options
context:
space:
mode:
authorYAMAMOTO Masaya <[email protected]>2017-10-11 17:53:17 +0900
committerYAMAMOTO Masaya <[email protected]>2017-10-11 17:58:11 +0900
commitacdc2d1f242f2547ca842be5d62a2b06356b39ea (patch)
tree3479c21be76ce7edde6a5fcacb6f60c1a5698a8a /src/array.c
parent679dfd75a8aeb26ee4ff0d7c148e1f6e88e39c3d (diff)
downloadmruby-acdc2d1f242f2547ca842be5d62a2b06356b39ea.tar.gz
mruby-acdc2d1f242f2547ca842be5d62a2b06356b39ea.zip
Add MRB_WITHOUT_FLOAT
Diffstat (limited to 'src/array.c')
-rw-r--r--src/array.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/array.c b/src/array.c
index 8f33defe6..7bd630638 100644
--- a/src/array.c
+++ b/src/array.c
@@ -767,9 +767,11 @@ aget_index(mrb_state *mrb, mrb_value index)
if (mrb_fixnum_p(index)) {
return mrb_fixnum(index);
}
+#ifndef MRB_WITHOUT_FLOAT
else if (mrb_float_p(index)) {
return (mrb_int)mrb_float(index);
}
+#endif
else {
mrb_int i, argc;
mrb_value *argv;