Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 48b219cf69e8d4fe071e57d669fd3a00a20c5969 1 parent 70a37c4
Ian MacLeod authored

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. +3 0  lib/bundler/runtime.rb
3  lib/bundler/runtime.rb
@@ -84,6 +84,9 @@ def autoload_dependency(dependency)
84 84 return require_dependency(dependency)
85 85 end
86 86
  87 + # Short circuit if we have nothing to require
  88 + return if dependency.autorequire && dependency.autorequire.empty?
  89 +
87 90 # Either the dependency has a set of symbols defined, or we try to guess from its name
88 91 symbols = Array(dependency.autoload_symbols || dependency.name.split(/[_\-]/).each {|w| w.capitalize!}.join)
89 92

0 comments on commit 48b219c

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