summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Nadeau <julian@jnadeau.ca>2017-04-20 12:22:09 -0700
committerJulian Nadeau <julian@jnadeau.ca>2017-04-20 12:22:09 -0700
commitafdfc57a87e02220eb1386edaff4aa9b6a391093 (patch)
treeb67064db40e3ac7b736784f8e88c656801adec66
parentc1c2a9d82e14c7858055295c2967785e2d43eda5 (diff)
downloadbundler-jules2689-stub-spec-extension-dir.tar.gz
-rw-r--r--lib/bundler/stub_specification.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb
index 7245860bbe..d5f6a883f9 100644
--- a/lib/bundler/stub_specification.rb
+++ b/lib/bundler/stub_specification.rb
@@ -18,10 +18,9 @@ module Bundler
super
# Stub has no concept of source, which means that extension_dir may be wrong
# This is the case for git-based gems. So, instead manually assign the extension dir
- if source.respond_to?(:extension_dir_name)
- path = File.join(stub.extensions_dir, source.extension_dir_name)
- stub.extension_dir = File.expand_path(path)
- end
+ return unless source.respond_to?(:extension_dir_name)
+ path = File.join(stub.extensions_dir, source.extension_dir_name)
+ stub.extension_dir = File.expand_path(path)
end
end