From fb1b4da13dc1144c49e0593ea089d666191c9c43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Mon, 10 Jun 2024 11:43:43 +0200 Subject: [PATCH] Simplify JRuby version check In case shelling out to jruby fails, the error output wouldn't get printed to stderr but ruby-build would abort. --- bin/ruby-build | 6 ++---- test/build.bats | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/bin/ruby-build b/bin/ruby-build index 0770dfbd1b..32ced67e52 100755 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -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 } diff --git a/test/build.bats b/test/build.bats index f856068d0e..3868124e13 100755 --- a/test/build.bats +++ b/test/build.bats @@ -848,7 +848,6 @@ DEF assert_success assert_build_log <