diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-16 07:11:41 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-16 07:11:41 +0000 |
commit | 703a24a9478e83925e4275d126bb54848a72076b (patch) | |
tree | c70629a744bc27db836d1b1a40d9d190414b3118 /insns.def | |
parent | 2e1523316d1de17fc80257a601aadac6df452fde (diff) |
merge revision(s) 53039: [Backport #11804]
* insns.def (opt_case_dispatch): avoid converting Infinity
* test/ruby/test_optimization.rb (test_opt_case_dispatch_inf): new
[ruby-dev:49423] [Bug #11804]'
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@53147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1275,7 +1275,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); } } |