From: "Eregon (Benoit Daloze)" Date: 2022-01-07T17:02:19+00:00 Subject: [ruby-core:107002] [Ruby master Feature#18461] closures are capturing unused variables Issue #18461 has been updated by Eregon (Benoit Daloze). bughit (bug hit) wrote in #note-9: > V8 handles that, detecting eval and deopting, so ruby can too. So what does V8 do then if `eval` is aliased e.g., to `e`? --- BTW, your replies feel rather aggressive to me. You are speaking to CRuby core members and Ruby JIT implementers, so I'd think it'd be nice to consider their opinion and not just dismissing them (that's what I feel in several of your replies in this issue). For example they might know Ruby semantics better. Also I would personally appreciate to know a little bit more about you, you seem to know quite a bit V8. Did you work on V8 maybe? ---------------------------------------- Feature #18461: closures are capturing unused variables https://bugs.ruby-lang.org/issues/18461#change-95834 * Author: bughit (bug hit) * Status: Open * Priority: Normal ---------------------------------------- ```rb def foo a = 1 ->{} end p foo.binding.local_variables # [:a] ``` Shouldn't `a` be optimized away? Like v8 does (https://bugs.chromium.org/p/v8/issues/detail?id=3491) -- https://bugs.ruby-lang.org/ Unsubscribe: