Project

General

Profile

Backport #3957

instance_exec and instance_eval crash ruby when passed '&variable' which stores a 'method(:whatever).to_param'

Added by lholden (Lori Holden) almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[ruby-core:32830]

Description

=begin
# results in a crash:
def a_method; end
a = method(:a_method).to_proc
instance_exec &a

# however works:
def a_method; end
instance_exec &(method(:a_method).to_proc)
=end


Files

backtrace.txt (6.83 KB) backtrace.txt Log with backtrace :) lholden (Lori Holden), 10/17/2010 11:58 PM

Related issues

Is duplicate of Ruby master - Bug #3786: instance_execにメソッドをわたした場合の挙動Closed09/05/2010Actions
Is duplicate of Ruby master - Bug #3860: VM aborts when calling instance_eval on a Method converted to a procClosed09/23/2010Actions
Is duplicate of Backport192 - Backport #3868: Segfault in 1.9.2 when using instance_eval with a Method objectClosed09/24/2010Actions

History

#1

Updated by yugui (Yuki Sonoda) almost 9 years ago

  • Status changed from Open to Closed

=begin
it will be fixed in the next release of Ruby 1.9.2.
=end

Also available in: Atom PDF