summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def2
1 files changed, 1 insertions, 1 deletions
diff --git a/insns.def b/insns.def
index 3c185bd084..df65aa8efd 100644
--- a/insns.def
+++ b/insns.def
@@ -1262,7 +1262,7 @@ opt_case_dispatch
switch(TYPE(key)) {
case T_FLOAT: {
double ival;
- if (modf(RFLOAT_VALUE(key), &ival) == 0.0) {
+ if (modf(RFLOAT_VALUE(key), &ival) == 0.0 && !isinf(ival)) {
key = FIXABLE(ival) ? LONG2FIX((long)ival) : rb_dbl2big(ival);
}
}