Skip to content
Browse files

Optimize and don't autoload gems that have nothing to require

  • Loading branch information...
1 parent 70a37c4 commit 48b219cf69e8d4fe071e57d669fd3a00a20c5969 @nevir committed May 14, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/bundler/runtime.rb
View
3 lib/bundler/runtime.rb
@@ -84,6 +84,9 @@ def autoload_dependency(dependency)
return require_dependency(dependency)
end
+ # Short circuit if we have nothing to require
+ return if dependency.autorequire && dependency.autorequire.empty?
+
# Either the dependency has a set of symbols defined, or we try to guess from its name
symbols = Array(dependency.autoload_symbols || dependency.name.split(/[_\-]/).each {|w| w.capitalize!}.join)

0 comments on commit 48b219c

Please sign in to comment.
Something went wrong with that request. Please try again.