diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index 467f7e7a86..26abfc8b2a 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -185,7 +185,7 @@ have_func("EVP_PKEY_dup") Logging::message "=== Checking done. ===\n" if openssl_3 - if $warnflags.sub!(/-W\K(?=deprecated-declarations)/, 'no-') + if $warnflags&.sub!(/-W\K(?=deprecated-declarations)/, 'no-') $warnflags << " -Wno-incompatible-pointer-types-discards-qualifiers" end end