summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-11-18 23:41:26 +0900
committerKazuhiro NISHIYAMA <znz@users.noreply.github.com>2019-11-19 00:29:10 +0900
commitfea24bbfdbe17da1038355fe7e0f7063f8c26c87 (patch)
tree49d47a90e18091bea1783e6d18c01b6679300efd /spec
parent9aa75795f9f438d5c874d8e418c3c7cdd63024fa (diff)
Fix glob base in bundler.gemspec
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2683
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/support/path.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/bundler/support/path.rb b/spec/bundler/support/path.rb
index e778809830..6f78490fe8 100644
--- a/spec/bundler/support/path.rb
+++ b/spec/bundler/support/path.rb
@@ -159,7 +159,8 @@ module Spec
def with_root_gemspec
if ruby_core?
root_gemspec = root.join("bundler.gemspec")
- spec = Gem::Specification.load(gemspec.to_s)
+ # Dir.chdir(root) for Dir.glob in gemspec
+ spec = Dir.chdir(root) { Gem::Specification.load(gemspec.to_s) }
spec.bindir = "libexec"
File.open(root_gemspec.to_s, "w") {|f| f.write spec.to_ruby }
yield(root_gemspec)