From 1fd0f04150f20b4f878448cb92738ef5ac7268db Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Fri, 14 Oct 2016 14:33:03 -0500 Subject: [Index] Allow pre-release versions when the base is pre-release --- lib/bundler/index.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb index 4529c57279..5bdb102d37 100644 --- a/lib/bundler/index.rb +++ b/lib/bundler/index.rb @@ -179,7 +179,8 @@ module Bundler end wants_prerelease = dependency.requirement.prerelease? - only_prerelease = specs.all? {|spec| spec.version.prerelease? } + wants_prerelease ||= base && base.any? {|base_spec| base_spec.version.prerelease? } + only_prerelease = specs.all? {|spec| spec.version.prerelease? } unless wants_prerelease || only_prerelease found.reject! {|spec| spec.version.prerelease? } -- cgit v1.2.1