diff --git a/middleman-core/lib/middleman-core/load_paths.rb b/middleman-core/lib/middleman-core/load_paths.rb index 5a3e3fbe..7daffe4c 100644 --- a/middleman-core/lib/middleman-core/load_paths.rb +++ b/middleman-core/lib/middleman-core/load_paths.rb @@ -37,7 +37,8 @@ module Middleman end # Recursive method to find a file in parent directories - def findup(filename, cwd=Pathname.new(Dir.pwd)) + def findup(filename, cwd=Dir.pwd) + cwd = Pathname(cwd) return cwd.to_s if (cwd + filename).exist? return false if cwd.root? findup(filename, cwd.parent)