Permalink
Browse files

fix shadowed variables

  • Loading branch information...
1 parent 58c57a8 commit f75d7d2b8b2178d5b7f9af1375b0e7151e3771d5 @tenderlove committed Mar 22, 2013
Showing with 7 additions and 7 deletions.
  1. +1 −1 lib/sass/selector/sequence.rb
  2. +3 −3 lib/sass/selector/simple_sequence.rb
  3. +3 −3 lib/sass/tree/visitors/cssize.rb
@@ -255,7 +255,7 @@ def merge_final_ops(seq1, seq2, res = [])
# is a supersequence of the other, use that, otherwise give up.
lcs = Sass::Util.lcs(ops1, ops2)
return unless lcs == ops1 || lcs == ops2
- res.unshift *(ops1.size > ops2.size ? ops1 : ops2).reverse
+ res.unshift(*(ops1.size > ops2.size ? ops1 : ops2).reverse)
return res
end
@@ -135,9 +135,9 @@ def do_extend(extends, parent_directives, seen = Set.new)
# by the time extension and unification happen,
# this exception will only ever be raised as a result of programmer error
def unify(sels, other_subject)
- return unless sseq = members.inject(sels) do |sseq, sel|
- return unless sseq
- sel.unify(sseq)
+ return unless sseq = members.inject(sels) do |member, sel|
+ return unless member
+ sel.unify(member)
end
SimpleSequence.new(sseq, other_subject || subject?)
end
@@ -125,12 +125,12 @@ def visit_extend(node)
end
sel = sseq.members
- parent.resolved_rules.members.each do |seq|
- if !seq.members.last.is_a?(Sass::Selector::SimpleSequence)
+ parent.resolved_rules.members.each do |member|
+ if !member.members.last.is_a?(Sass::Selector::SimpleSequence)
raise Sass::SyntaxError.new("#{seq} can't extend: invalid selector")
end
- @extends[sel] = Extend.new(seq, sel, node, @parent_directives.dup, :not_found)
+ @extends[sel] = Extend.new(member, sel, node, @parent_directives.dup, :not_found)
end
end

0 comments on commit f75d7d2

Please sign in to comment.