Skip to content

Commit

Permalink
Avoid shadowing an enclosing scope variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Olson committed Nov 11, 2013
1 parent 32559ff commit 407073e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/apricot/special_forms/fn.rb
Expand Up @@ -273,10 +273,10 @@ def to_array

next_optional = fn.new_label

arglist.optional_args.each_with_index do |(name, value), i|
arglist.optional_args.each_with_index do |(name, value), j|
# Calculate the position of this optional arg, off the end of the
# required args
arg_index = arglist.num_required + i
arg_index = arglist.num_required + j

# Allocate a slot for this optional argument
overload_scope.new_local(name)
Expand Down

0 comments on commit 407073e

Please sign in to comment.