Permalink
Browse files

fix shadowed variable warnings and ambiguous grammar warnings

  • Loading branch information...
tenderlove committed Mar 21, 2013
1 parent 3df278a commit c909d1572637dbcf8aad6bc4c02cadce4a3d3e75
Showing with 4 additions and 4 deletions.
  1. +3 −3 test/sass/source_map_test.rb
  2. +1 −1 test/sass/util_test.rb
@@ -5,7 +5,7 @@
class SourcemapTest < Test::Unit::TestCase
def test_to_json_requires_args
- rendered, sourcemap = render_with_sourcemap('')
+ _, sourcemap = render_with_sourcemap('')
assert_raise(ArgumentError) {sourcemap.to_json({})}
assert_raise(ArgumentError) {sourcemap.to_json({:css_path => 'foo'})}
assert_raise(ArgumentError) {sourcemap.to_json({:sourcemap_path => 'foo'})}
@@ -754,8 +754,8 @@ def build_mapping_from_annotations(source, css, source_file_name)
assert(target_ranges[name], "No target ranges for annotation #{name}")
target_ranges[name].map {|target_range| [sources.first, target_range]}
end, 1).
- sort_by {|(source, target)| [target.start_pos.line, target.start_pos.offset]}.
- each {|(source, target)| map.add(source, target)}
+ sort_by {|(_, target)| [target.start_pos.line, target.start_pos.offset]}.
+ each {|(s2, target)| map.add(s2, target)}
map
end
View
@@ -324,7 +324,7 @@ def assert_json_string(source, target)
def test_json_value_of
assert_json_value 0, "0"
- assert_json_value -42, "-42"
+ assert_json_value(-42, "-42")
assert_json_value 42, "42"
assert_json_value true, "true"
assert_json_value false, "false"

0 comments on commit c909d15

Please sign in to comment.