summaryrefslogtreecommitdiffhomepage
path: root/src/enum.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/enum.c')
-rw-r--r--src/enum.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/enum.c b/src/enum.c
index 94103e35e..ea05777b3 100644
--- a/src/enum.c
+++ b/src/enum.c
@@ -20,9 +20,11 @@ enum_update_hash(mrb_state *mrb, mrb_value self)
if (mrb_fixnum_p(item_hash)) {
hv = mrb_fixnum(item_hash);
}
+#ifndef MRB_WITHOUT_FLOAT
else if (mrb_float_p(item_hash)) {
hv = (mrb_int)mrb_float(item_hash);
}
+#endif
else {
mrb_raise(mrb, E_TYPE_ERROR, "can't calculate hash");
}