mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert "we never pass blocks, so remove this"
This reverts commit 9caf0cf9c8
.
This commit is contained in:
parent
ccbefff684
commit
d2c0571bf6
1 changed files with 1 additions and 1 deletions
|
@ -251,7 +251,7 @@ module ActiveSupport
|
|||
def make_lambda(filter)
|
||||
case filter
|
||||
when Symbol
|
||||
lambda { |target, _| target.send filter }
|
||||
lambda { |target, _, &blk| target.send filter, &blk }
|
||||
when String
|
||||
l = eval "lambda { |value| #{filter} }"
|
||||
lambda { |target, value| target.instance_exec(value, &l) }
|
||||
|
|
Loading…
Reference in a new issue