Skip to content

Commit

Permalink
Handle Ruby 3.1 rubgygems minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Dec 17, 2024
1 parent 10ec81b commit decfd72
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion script/update_rubygems_and_install_bundler
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ function is_ruby_3_plus {
fi
}

if is_ruby_3_plus; then
function is_ruby_3_1_plus {
if ruby -e "exit(RUBY_VERSION.to_f >= 3.1)"; then
return 0
else
return 1
fi
}


if is_ruby_3_1_plus; then
gem update --no-document --system
gem install --no-document bundler
elif is_ruby_3_plus; then
gem update --no-document --system '3.5.23'
gem install --no-document bundler
else
gem update --no-document --system '3.4.22'
gem install --no-document bundler
Expand Down

0 comments on commit decfd72

Please sign in to comment.