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)
|
def make_lambda(filter)
|
||||||
case filter
|
case filter
|
||||||
when Symbol
|
when Symbol
|
||||||
lambda { |target, _| target.send filter }
|
lambda { |target, _, &blk| target.send filter, &blk }
|
||||||
when String
|
when String
|
||||||
l = eval "lambda { |value| #{filter} }"
|
l = eval "lambda { |value| #{filter} }"
|
||||||
lambda { |target, value| target.instance_exec(value, &l) }
|
lambda { |target, value| target.instance_exec(value, &l) }
|
||||||
|
|
Loading…
Reference in a new issue