summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index e202435..2a089e8 100644
--- a/compile.c
+++ b/compile.c
@@ -2909,6 +2909,11 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
enum ruby_vminsn_type previ = ((INSN *)prev)->insn_id;
if (previ == BIN(putobject) || previ == BIN(putnil) ||
previ == BIN(putself) || previ == BIN(putstring) ||
+ previ == BIN(dup) ||
+ previ == BIN(getlocal) ||
+ previ == BIN(getblockparam) ||
+ previ == BIN(getblockparamproxy) ||
+ /* getinstancevariable may issue a warning */
previ == BIN(duparray)) {
/* just push operand or static value and pop soon, no
* side effects */