[ruby-core:120851] [Ruby master Bug#21103] Binding problem with delegate methods

Issue #21103 has been reported by tenderlovemaking (Aaron Patterson). ---------------------------------------- Bug #21103: Binding problem with delegate methods https://bugs.ruby-lang.org/issues/21103 * Author: tenderlovemaking (Aaron Patterson) * Status: Open * Assignee: tenderlovemaking (Aaron Patterson) * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- ```ruby 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. -- https://bugs.ruby-lang.org/

Issue #21103 has been updated by nobu (Nobuyoshi Nakada). https://github.com/ruby/ruby/pull/12686 ---------------------------------------- Bug #21103: Binding problem with delegate methods https://bugs.ruby-lang.org/issues/21103#change-111729 * Author: tenderlovemaking (Aaron Patterson) * Status: Open * Assignee: tenderlovemaking (Aaron Patterson) * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED ---------------------------------------- ```ruby 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. -- https://bugs.ruby-lang.org/

Issue #21103 has been updated by k0kubun (Takashi Kokubun). 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 ruby_3_4 commit:e5403bd137d57991d8788cd29bbb5916d75acb36 merged revision(s) commit:db02a6b3ab4cabbdf492c26dcb1929b4ef0370a1. ---------------------------------------- Bug #21103: Binding problem with delegate methods https://bugs.ruby-lang.org/issues/21103#change-111935 * Author: tenderlovemaking (Aaron Patterson) * Status: Closed * Assignee: tenderlovemaking (Aaron Patterson) * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE ---------------------------------------- ```ruby 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. -- https://bugs.ruby-lang.org/
participants (3)
-
k0kubun (Takashi Kokubun)
-
nobu (Nobuyoshi Nakada)
-
tenderlovemaking (Aaron Patterson)