File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,20 @@ def hash
3838 identifier . hash
3939 end
4040
41+ ##
42+ # Does this locked specification satisfy +dependency+?
43+ #
44+ # NOTE: Rubygems default requirement is ">= 0", which doesn't match
45+ # prereleases of 0 versions, like "0.0.0.dev" or "0.0.0.SNAPSHOT". However,
46+ # bundler users expect those to work. We need to make sure that Gemfile
47+ # dependencies without explicit requirements (which use ">= 0" under the
48+ # hood by default) are still valid for locked specs using this kind of
49+ # versions. The method implements an ad-hoc fix for that. A better solution
50+ # might be to change default rubygems requirement of dependencies to be ">=
51+ # 0.A" but that's a major refactoring likely to break things. Hopefully we
52+ # can attempt it in the future.
53+ #
54+
4155 def satisfies? ( dependency )
4256 effective_requirement = dependency . requirement == Gem ::Requirement . default ? Gem ::Requirement . new ( ">= 0.A" ) : dependency . requirement
4357
You can’t perform that action at this time.
0 commit comments