path: root/vm.c
diff options
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-18 02:10:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-18 02:10:37 +0000
commit0d0fc55122f7e64cf4d491c4a5f4bb941f29ec65 (patch)
treebc8d40e52e738bf4224a53b8f652edda1d38ba70 /vm.c
parentc317e978f79c920924f70eea8f66e69b40369fa5 (diff)
enum.c: optimize any? object allocations for Array and Hash
* enum.c (enum_any): optimize object allocations for Array and Hash when `each` is not redefined, always false if empty and the case without a block. [fix GH-617] git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index f9a2c3d..9630c31 100644
--- a/vm.c
+++ b/vm.c
@@ -1236,6 +1236,7 @@ vm_init_redefined_flag(void)
OP(Succ, SUCC), (C(Fixnum), C(String), C(Time));
OP(EqTilde, MATCH), (C(Regexp), C(String));
OP(Freeze, FREEZE), (C(String));
+ OP(Each, EACH), (C(Array), C(Hash));
#undef C
#undef OP