summaryrefslogtreecommitdiff
path: root/spec/bundler/support
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-04-01 09:23:09 +0200
committergit <svn-admin@ruby-lang.org>2022-05-11 16:55:47 +0900
commit54b1548760d3a159051247313256175904c6f36e (patch)
treeaa746dfb7777218774d8875949537a5ba7f83e11 /spec/bundler/support
parenta85cdb5a6e7d735b03eb5ae80e5ac0c5424eb259 (diff)
[rubygems/rubygems] Extract a `next_ruby_minor` helper method for specs
https://github.com/rubygems/rubygems/commit/66eae0ef1d
Diffstat (limited to 'spec/bundler/support')
-rw-r--r--spec/bundler/support/helpers.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb
index d7556102b4..ab6a0625bb 100644
--- a/spec/bundler/support/helpers.rb
+++ b/spec/bundler/support/helpers.rb
@@ -471,6 +471,10 @@ module Spec
end
end
+ def next_ruby_minor
+ Gem.ruby_version.segments[0..1].map.with_index {|s, i| i == 1 ? s + 1 : s }.join(".")
+ end
+
# versions providing a bundler version finder but not including
# https://github.com/rubygems/rubygems/commit/929e92d752baad3a08f3ac92eaec162cb96aedd1
def rubygems_version_failing_to_activate_bundler_prereleases