diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-05-08 14:19:04 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-05-13 07:54:37 +0900 |
commit | 0e60b59d5884edb8f9aea023efd9b24f1ff02049 (patch) | |
tree | e52935ce510440872ca5ce6b0e092cbc94f18bc9 /lib/bundler/remote_specification.rb | |
parent | 68224651a4d4dc3ce0cea666f5423dd8b6ba6cfc (diff) |
Update the bundler version with master branch
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3086
Diffstat (limited to 'lib/bundler/remote_specification.rb')
-rw-r--r-- | lib/bundler/remote_specification.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bundler/remote_specification.rb b/lib/bundler/remote_specification.rb index f87a09b9a6..00fe4da93f 100644 --- a/lib/bundler/remote_specification.rb +++ b/lib/bundler/remote_specification.rb @@ -50,6 +50,8 @@ module Bundler # once the remote gem is downloaded, the backend specification will # be swapped out. def __swap__(spec) + raise APIResponseInvalidDependenciesError unless spec.dependencies.all? {|d| d.is_a?(Gem::Dependency) } + SharedHelpers.ensure_same_dependencies(self, dependencies, spec.dependencies) @_remote_specification = spec end @@ -76,7 +78,8 @@ module Bundler deps = method_missing(:dependencies) # allow us to handle when the specs dependencies are an array of array of string - # see https://github.com/bundler/bundler/issues/5797 + # in order to delay the crash to `#__swap__` where it results in a friendlier error + # see https://github.com/rubygems/bundler/issues/5797 deps = deps.map {|d| d.is_a?(Gem::Dependency) ? d : Gem::Dependency.new(*d) } deps |