Project

General

Profile

Actions

Feature #7702

open

Remove Proc#binding

Added by jballanc (Joshua Ballanco) about 11 years ago. Updated over 4 years ago.

Status:
Open
Target version:
-
[ruby-core:51455]

Description

=begin
As discussed in the most recent Ruby implementer's meeting and elsewhere over the years, being able to get a handle to the binding of any block/proc has a number of problems:

  • Code execution after passing a block/proc in unpredictable, as the binding of said proc can be used to redefine any local, instance variable, method, class, module, etc.
  • Potentially sensitive data can leak out of the scope of a method via a proc binding
  • Large object graphs may need to be retained for the lifetime of a proc, since any identifier in scope at the time of proc creation must remain live in the event that the binding of the proc is used to evaluate code

Additionally, removal of Proc#binding would enable a number of very useful optimizations and performance improvements.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0