Project

General

Profile

Actions

Bug #21103

closed

Binding problem with delegate methods

Added by tenderlovemaking (Aaron Patterson) 1 day ago. Updated about 5 hours 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.

Actions #1

Updated by byroot (Jean Boussier) about 21 hours ago

  • 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
Actions #3

Updated by nobu (Nobuyoshi Nakada) about 5 hours ago

  • 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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0