From 97e874484708b48c7eee1df834c7d2941dc94b48 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Mon, 29 Aug 2011 11:31:27 -0700 Subject: [PATCH] change autorequire form to only search the newest gems by version --- lib/middleman.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/middleman.rb b/lib/middleman.rb index 60b29b1d..4b00b5ea 100755 --- a/lib/middleman.rb +++ b/lib/middleman.rb @@ -160,8 +160,8 @@ module Middleman EXTENSION_FILE = "middleman_init.rb" def self.load_extensions_in_path # If newer Rubygems - extensions = if Gem::Specification.respond_to? :select - ::Gem::Specification.select do |spec| + extensions = if Gem::Specification.respond_to? :latest_specs + ::Gem::Specification.latest_specs.select do |spec| spec.contains_requirable_file?(EXTENSION_FILE) end else