Bug #21103
closed
Binding problem with delegate methods
Added by tenderlovemaking (Aaron Patterson) about 1 month ago.
Updated 22 days ago.
Description
def foo(...)
a = 123
binding.local_variable_get(:a)
end
p foo([])
Expected output is 123
, actual output is some number. I think there is an off-by-one error in bindings created from delegate frames.
- Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED
- Status changed from Open to Closed
Applied in changeset git|db02a6b3ab4cabbdf492c26dcb1929b4ef0370a1.
[Bug #21103] Fix local variable index calculation with forwarding
Forwarding argument is optimized not to packed when no other arguments
and an internal object refers values before it. This size is decided
at called time, calculate the local variable index from the fixed end
point.
- Backport changed from 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE
Also available in: Atom
PDF