Merge pull request #2040 from rbenv/fix-yjit-condition

bash didn't provide \d
This commit is contained in:
Hiroshi SHIBATA 2022-09-10 14:37:11 +09:00 committed by GitHub
commit 0872173377
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1286,7 +1286,7 @@ build_package_enable_yjit() {
local rustc_ver="$(rustc --version 2>/dev/null)"
[ -n "$rustc_ver" ] || return 0
# YJIT supports Rust 1.58.1 and later
if [[ "${rustc_ver}" =~ ^rustc\ 1\.(58\.1|59\.|[6789]\d\.) ]]; then
if [[ "${rustc_ver}" =~ ^rustc\ 1\.(58\.1|59\.|[6789][0-9]\.) ]]; then
echo "Building with YJIT by default because ${rustc_ver} is installed; add RUBY_CONFIGURE_OPTS='--disable-yjit' to disable explicitly" >&3
package_option ruby configure --enable-yjit
else