From bcf6c74b7ebce2fd89d495474130f16ae34ae72d Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 23 Jan 2010 23:05:24 -0800 Subject: [PATCH] Silence a warning in autocompile mode. --- doc-src/lib/stylesheets/sass_extensions.rb | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/doc-src/lib/stylesheets/sass_extensions.rb b/doc-src/lib/stylesheets/sass_extensions.rb index 16f4dd1a..8a263439 100644 --- a/doc-src/lib/stylesheets/sass_extensions.rb +++ b/doc-src/lib/stylesheets/sass_extensions.rb @@ -142,18 +142,20 @@ module Sass end end class Operation < Node - OPERATORS_TO_SASS = { - :plus => '+', - :minus => '-', - :div => '/', - :mult => '*', - :comma => ',', - :concat => ' ', - :neq => '!=', - :eq => '==', - :or => 'or', - :and => 'and' - } + unless defined? OPERATORS_TO_SASS + OPERATORS_TO_SASS = { + :plus => '+', + :minus => '-', + :div => '/', + :mult => '*', + :comma => ',', + :concat => ' ', + :neq => '!=', + :eq => '==', + :or => 'or', + :and => 'and' + } + end def to_sass "#{operand_to_sass(@operand1)} #{OPERATORS_TO_SASS[@operator]} #{operand_to_sass(@operand2)}" end