diff options
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/ruby_version.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bundler/ruby_version.rb b/lib/bundler/ruby_version.rb index 800a4433..92f9d4c3 100644 --- a/lib/bundler/ruby_version.rb +++ b/lib/bundler/ruby_version.rb @@ -103,6 +103,9 @@ module Bundler private def matches?(requirements, version) + # Handles RUBY_PATCHLEVEL of -1 for instances like ruby-head + return requirements == version if requirements.to_s == "-1" || version.to_s == "-1" + Array(requirements).all? do |requirement| Gem::Requirement.create(requirement).satisfied_by?(Gem::Version.create(version)) end |