1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fix shadowed variable warnings

This commit is contained in:
Aaron Patterson 2013-05-14 12:03:33 -07:00
parent 87378b0b6d
commit 78202055c9

View file

@ -507,9 +507,9 @@ module ActiveSupport
@callbacks = nil @callbacks = nil
end end
def each(&block); @chain.each(&block); end def each(&block); @chain.each(&block); end
def index(o); @chain.index(o); end def index(o); @chain.index(o); end
def empty?; @chain.empty?; end def empty?; @chain.empty?; end
def insert(index, o) def insert(index, o)
@callbacks = nil @callbacks = nil
@ -629,9 +629,9 @@ module ActiveSupport
# existing chain rather than appended. # existing chain rather than appended.
def set_callback(name, *filter_list, &block) def set_callback(name, *filter_list, &block)
type, filters, options = normalize_callback_params(name, filter_list, block) type, filters, options = normalize_callback_params(name, filter_list, block)
chain = get_callbacks name self_chain = get_callbacks name
mapped = filters.map do |filter| mapped = filters.map do |filter|
Callback.build(chain, filter, type, options.dup) Callback.build(self_chain, filter, type, options.dup)
end end
__update_callbacks(name) do |target, chain| __update_callbacks(name) do |target, chain|