Merge pull request #2573 from rbenv/fix-warning

Fixes "integer expression expected" error
This commit is contained in:
Mislav Marohnić 2025-09-25 13:53:54 +02:00 committed by GitHub
commit a5e7ec95cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -720,7 +720,7 @@ build_package_standard() {
fi
if [ -z "$CC" ] && is_mac 1010; then
export CC=clang
elif [ "$ruby_semver" -lt 30200 ] && is_fedora 42; then
elif [[ "$package_var_name" = "RUBY" && "$ruby_semver" -lt 30200 ]] && is_fedora 42; then
# Fedora 42+ has updated to GCC v15. GCC v15 changed the default
# mode from gnu17 to gnu23: https://gcc.gnu.org/gcc-15/changes.html#c
#

View file

@ -423,6 +423,12 @@ install_package "ruby-3.2.0" "http://ruby-lang.org/ruby/2.0/ruby-3.2.0.tar.gz"
DEF
assert_success
sanitized_output="$(grep -v '^\(->\|==>\)' <<<"$output" || true)"
if [ -n "$sanitized_output" ]; then
echo "expected no warnings, got: $sanitized_output"
return 1
fi
unstub uname
unstub brew
unstub cc