From 4d2ce0cbff3cee1119fb664bca5f67332a94dadd Mon Sep 17 00:00:00 2001
From: normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Mon, 7 Dec 2015 23:56:57 +0000
Subject: insns.def (opt_case_dispatch): check Float#=== redefinition

The missing check for Float#=== redefinition was noticed while
working on enhancing optimized case dispatch for nil/true/false
in [ruby-core:71818] https://bugs.ruby-lang.org/issues/11769

So no, I don't normally redefine core classes like this :P

* insns.def (opt_case_dispatch): check Float#=== redefinition
* test/ruby/test_optimization.rb (test_opt_case_dispatch): new
  [ruby-core:71920] [Bug #11784]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 insns.def | 1 +
 1 file changed, 1 insertion(+)

(limited to 'insns.def')

diff --git a/insns.def b/insns.def
index 36a132b585..c8088919c5 100644
--- a/insns.def
+++ b/insns.def
@@ -1271,6 +1271,7 @@ opt_case_dispatch
 	if (BASIC_OP_UNREDEFINED_P(BOP_EQQ,
 				   SYMBOL_REDEFINED_OP_FLAG |
 				   FIXNUM_REDEFINED_OP_FLAG |
+				   FLOAT_REDEFINED_OP_FLAG |
 				   BIGNUM_REDEFINED_OP_FLAG |
 				   STRING_REDEFINED_OP_FLAG)) {
 	    st_data_t val;
-- 
cgit v1.2.3

