diff --git a/lib/compass/sprite_importer.rb b/lib/compass/sprite_importer.rb index 0d92fda9..e2948271 100644 --- a/lib/compass/sprite_importer.rb +++ b/lib/compass/sprite_importer.rb @@ -81,7 +81,7 @@ module Compass # Returns an Array of image names without the file extension def sprite_names - @sprite_names ||= files.collect do |file| + files.collect do |file| filename = File.basename(file, '.png') unless VAILD_FILE_NAME =~ filename raise Compass::Error, "Sprite file names must be legal css identifiers. Please rename #{File.basename(file)}"