1
0
Fork 0
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:
Aaron Patterson 2013-05-13 16:53:08 -07:00
parent ccbefff684
commit d2c0571bf6

View file

@ -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) }