diff --git a/spec/ruby/optional/capi/spec_helper.rb b/spec/ruby/optional/capi/spec_helper.rb index 3b13e0854d..2c36ead8d0 100644 --- a/spec/ruby/optional/capi/spec_helper.rb +++ b/spec/ruby/optional/capi/spec_helper.rb @@ -76,7 +76,7 @@ def compile_extension(name) $ruby = ENV.values_at('RUBY_EXE', 'RUBY_FLAGS').join(' ') # MRI magic to consider building non-bundled extensions $extout = nil - $warnflags << ' -Wno-declaration-after-statement' + append_cflags '-Wno-declaration-after-statement' create_makefile(#{ext.inspect}) RUBY output = ruby_exe("extconf.rb")