Merge pull request #2406 from rbenv/jruby-9.2-workaround

Simplify JRuby version check
This commit is contained in:
Mislav Marohnić 2024-06-11 13:53:49 +02:00 committed by GitHub
commit 5e23d85e26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 5 deletions

View file

@ -860,7 +860,7 @@ build_package_jruby() {
cd "${PREFIX_PATH}/bin"
ln -fs jruby ruby
chmod +x ruby
install_jruby_launcher
install_jruby_launcher "$1"
remove_windows_files
fix_jruby_shebangs
}
@ -869,9 +869,7 @@ install_jruby_launcher() {
# shellcheck disable=SC2164
cd "${PREFIX_PATH}/bin"
# workaround for https://github.com/jruby/jruby/issues/7799
local jruby_version
jruby_version="$(./ruby -e 'puts JRUBY_VERSION' 2>/dev/null)"
[[ $jruby_version != "9.2."* ]] ||
[[ $1 != "jruby-9.2."* ]] ||
capture_command ./ruby gem update -q --silent --system 3.3.26 --no-document --no-post-install-message
capture_command ./ruby gem install jruby-launcher --no-document
}

View file

@ -848,7 +848,6 @@ DEF
assert_success
assert_build_log <<OUT
jruby [-e,puts JRUBY_VERSION]
jruby [gem,install,jruby-launcher,--no-document]
OUT