Skip to content

Commit

Permalink
Store line number in Sequence#line=
Browse files Browse the repository at this point in the history
The `scss-lint` project performs a number of static checks against SCSS
code to find style offenses.

`Sequence` objects were returning `nil` when calling `#line`. This was
because `Sequence#line=` was not recording the actual line in an
instance variable like `AbstractSequence`. Fix this by ensuring the line
number is stored in `@line`.

This will allow the `scss-lint` project to implement
sds/scss-lint#456
  • Loading branch information
sds committed Jun 8, 2015
1 parent ecf0ff5 commit 430a149
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sass/selector/sequence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Sequence < AbstractSequence
# @return [Fixnum]
def line=(line)
members.each {|m| m.line = line if m.is_a?(SimpleSequence)}
line
@line = line
end

# Sets the name of the file in which this selector was declared,
Expand Down

0 comments on commit 430a149

Please sign in to comment.