diff --git a/ext/v8/extconf.rb b/ext/v8/extconf.rb index b8cec01..7560141 100644 --- a/ext/v8/extconf.rb +++ b/ext/v8/extconf.rb @@ -23,7 +23,9 @@ $LIBS << ' -lpthread ' CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/ -CONFIG['warnflags'].gsub!('-Wdeclaration-after-statement', '') -CONFIG['warnflags'].gsub!('-Wimplicit-function-declaration', '') +if CONFIG['warnflags'] + CONFIG['warnflags'].gsub!('-Wdeclaration-after-statement', '') + CONFIG['warnflags'].gsub!('-Wimplicit-function-declaration', '') +end create_makefile('init')