Project

General

Profile

This project is closed and read-only.

Actions

Backport #8345

closed

Method#to_proc assumes lambda returns a Proc

Backport #8345: Method#to_proc assumes lambda returns a Proc

Added by Anonymous over 13 years ago. Updated over 13 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: PDF Atom