Project

General

Profile

Actions

Backport #8345

closed

Method#to_proc assumes lambda returns a Proc

Added by Anonymous almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
[ruby-core:54687]

Description

=begin
Method#to_proc calls #lambda and assumes the return value is a Proc by passing it to GetProcPtr.

If #lambda is overridden this can cause segfaults:

def lambda
end

method(:puts).to_proc # segfault

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0