Skip to content

Commit 8fa29e5

Browse files
This warrants a comment
1 parent 711498b commit 8fa29e5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

bundler/lib/bundler/lazy_specification.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)