class Sass::Constant::Number

def operate(other, operation)

def operate(other, operation)
  unit = nil
  if other.unit.nil?
    unit = self.unit
  elsif self.unit.nil?
    unit = other.unit
  elsif other.unit == self.unit
    unit = self.unit
  else
    raise Sass::SyntaxError.new("Incompatible units: #{self.unit} and #{other.unit}.")
  end
  Number.from_value(self.value.send(operation, other.value), unit)
end