From 0459eaec95a4daf2c019683785e6fca30eae15c2 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Mon, 20 Feb 2023 17:38:00 +0100 Subject: compile.c: eliminate getinstancevariable -> pop sequences This case wasn't eliminated before because `getinstancevariable` could emit a warning, but that's no longer the case since Ruby 3.0. --- compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index 41e908ecd0..22c5d7ea3d 100644 --- a/compile.c +++ b/compile.c @@ -3319,7 +3319,7 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal previ == BIN(getlocal) || previ == BIN(getblockparam) || previ == BIN(getblockparamproxy) || - /* getinstancevariable may issue a warning */ + previ == BIN(getinstancevariable) || previ == BIN(duparray)) { /* just push operand or static value and pop soon, no * side effects */ -- cgit v1.2.1