Skip to content

Commit 5e23d85

Browse files
authored
Merge pull request #2406 from rbenv/jruby-9.2-workaround
Simplify JRuby version check
2 parents 96d5ce2 + fb1b4da commit 5e23d85

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

bin/ruby-build

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ build_package_jruby() {
860860
cd "${PREFIX_PATH}/bin"
861861
ln -fs jruby ruby
862862
chmod +x ruby
863-
install_jruby_launcher
863+
install_jruby_launcher "$1"
864864
remove_windows_files
865865
fix_jruby_shebangs
866866
}
@@ -869,9 +869,7 @@ install_jruby_launcher() {
869869
# shellcheck disable=SC2164
870870
cd "${PREFIX_PATH}/bin"
871871
# workaround for https://github.com/jruby/jruby/issues/7799
872-
local jruby_version
873-
jruby_version="$(./ruby -e 'puts JRUBY_VERSION' 2>/dev/null)"
874-
[[ $jruby_version != "9.2."* ]] ||
872+
[[ $1 != "jruby-9.2."* ]] ||
875873
capture_command ./ruby gem update -q --silent --system 3.3.26 --no-document --no-post-install-message
876874
capture_command ./ruby gem install jruby-launcher --no-document
877875
}

test/build.bats

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,6 @@ DEF
848848
assert_success
849849

850850
assert_build_log <<OUT
851-
jruby [-e,puts JRUBY_VERSION]
852851
jruby [gem,install,jruby-launcher,--no-document]
853852
OUT
854853

0 commit comments

Comments
 (0)