Y'all understand this way more than I do, can you comment on whether my analysis [here](https://github.com/rails/rails/issues/42653) seems correct?josh.cheek (Josh Cheek)
jeremyevans0 (Jeremy Evans) wrote in #note-4: > Note that from a caller's perspective, `[[:rest, :*]]` and `[[:rest, :*], [:keyrest, :**]]` have identical behavior. Both accept an arbitrary number of positional argument and arbitrary ke...josh.cheek (Josh Cheek)
## Maybe bug 1 Refinements must be created after methods are defined. ```ruby # This one seems buggy module M1 refine(Object) { include M1 } def m() = M1 using M1 m rescue $! # => #<NameError: undefined local variable...josh.cheek (Josh Cheek)
jeremyevans0 (Jeremy Evans) wrote in #note-1: > Forwarded arguments is implemented as `(*args, &block)` with `ruby2_keywords`, not as `(*args, **kwargs, &block)`. If you add `def wrapper4(*r, &b) = wrapped(*r, &b),` to `methods` and the...josh.cheek (Josh Cheek)
When asking a method about its parameters, forwarded arguments say they are a rest and a block (`wrapper1` in the example below). However, when we use that signature, it raises an ArgumentError (`wrapper2` in the example below). When I...josh.cheek (Josh Cheek)
The reason seems to be because the generated iseq doesn't cache the intermediate calculations: ```sh $ ruby -e 'puts RubyVM::InstructionSequence.new("defined? a.b.c.d.e.f").disasm' == disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(1,...josh.cheek (Josh Cheek)
I should have clarified my expectation: On the ones that call `defined?` I expected the number of calls to be 1 less than the ones that don't call `defined?`josh.cheek (Josh Cheek)
Honestly, I was surprised `defined?` works with expressions at all. I wouldn't object to this feature being removed, it leads to strange situations where it invokes methods, like below, and silently returns wrong results, if any of the m...josh.cheek (Josh Cheek)
It's intentional. Eg what if you set the same variable in both branches? Then it would be clearer that you are expecting the variable to be visible outside the scope of the conditional. Contrived code example: ```ruby if eligible?...josh.cheek (Josh Cheek)