Previously, calling directory("/hi") would error, because

options would remain nil if self doesn't respond_to?(:options)

So, just double check we have something in options
This commit is contained in:
Hampton Catlin 2011-05-30 16:15:35 +01:00
parent bcc3000860
commit 9add993129

View File

@ -17,6 +17,7 @@ module Compass
# create a directory and all the directories necessary to reach it.
def directory(dir, options = nil)
options ||= self.options if self.respond_to?(:options)
options ||= {}
if File.exists?(dir) && File.directory?(dir)
# logger.record :exists, basename(dir) unless options[:quiet]
elsif File.exists?(dir)