diff --git a/lib/compass/sass_extensions/sprites/base.rb b/lib/compass/sass_extensions/sprites/base.rb index 4710c615..0534d216 100644 --- a/lib/compass/sass_extensions/sprites/base.rb +++ b/lib/compass/sass_extensions/sprites/base.rb @@ -73,10 +73,9 @@ module Compass imgs = @images.sort { |a,b| a.width <=> b.width } fitter = ::Compass::SassExtensions::Sprites::RowFitter.new(imgs) - rows = fitter.fit! current_y = 0 - rows.each do |row| + fitter.fit!.each do |row| current_x = 0 row.images.each_with_index do |image, index| image.left = current_x