From: nobu@... Date: 2015-03-29T02:46:06+00:00 Subject: [ruby-core:68673] [Ruby trunk - Bug #11012] [Open] `local_variable_get` crashes on a `Proc` from a method Issue #11012 has been reported by Nobuyoshi Nakada. ---------------------------------------- Bug #11012: `local_variable_get` crashes on a `Proc` from a method https://bugs.ruby-lang.org/issues/11012 * Author: Nobuyoshi Nakada * Status: Open * Priority: Normal * Assignee: Nobuyoshi Nakada * ruby -v: 50107 * Backport: 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED ---------------------------------------- The following code shows unexpected random object, or segfaults sometimes. ~~~ruby class << (obj = Object.new) src = 1000.times.map {|i|"v#{i} = "}.join("") eval("def foo()\n""#{src}nil\n""end") end b = obj.method(:foo).to_proc.binding p b.local_variable_get("v999") ~~~ -- https://bugs.ruby-lang.org/