summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorJean Boussier <byroot@ruby-lang.org>2023-02-20 17:38:00 +0100
committerJean Boussier <jean.boussier@gmail.com>2023-02-20 19:04:04 +0100
commit0459eaec95a4daf2c019683785e6fca30eae15c2 (patch)
treea491deb761780ddbf5e5a06f45f28b7af5423289 /compile.c
parentecd0cdaf820af789f355f1a18c31d6adfe8aad94 (diff)
downloadruby-0459eaec95a4daf2c019683785e6fca30eae15c2.tar.gz
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.
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c2
1 files changed, 1 insertions, 1 deletions
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 */