Skip to content

Commit decfd72

Browse files
committed
Handle Ruby 3.1 rubgygems minimum
1 parent 10ec81b commit decfd72

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

script/update_rubygems_and_install_bundler

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,21 @@ function is_ruby_3_plus {
1111
fi
1212
}
1313

14-
if is_ruby_3_plus; then
14+
function is_ruby_3_1_plus {
15+
if ruby -e "exit(RUBY_VERSION.to_f >= 3.1)"; then
16+
return 0
17+
else
18+
return 1
19+
fi
20+
}
21+
22+
23+
if is_ruby_3_1_plus; then
1524
gem update --no-document --system
1625
gem install --no-document bundler
26+
elif is_ruby_3_plus; then
27+
gem update --no-document --system '3.5.23'
28+
gem install --no-document bundler
1729
else
1830
gem update --no-document --system '3.4.22'
1931
gem install --no-document bundler

0 commit comments

Comments
 (0)