From d5fa05bc7d3906248d8c78319bf19a09b0aa2648 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 29 Nov 2010 14:36:12 -0800 Subject: [PATCH] Fix a bug in ruby 1.9 --- lib/compass/sprites.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/compass/sprites.rb b/lib/compass/sprites.rb index eed1468e..38aa002b 100644 --- a/lib/compass/sprites.rb +++ b/lib/compass/sprites.rb @@ -15,7 +15,9 @@ module Compass end def sprites(path, name, create = false) - @@sprites = {} if @@sprites.nil? + if !defined?(@@sprites) || @@sprites.nil? + @@sprites = {} + end index = "#{path}/#{name}" images = @@sprites[index] if images