From 223f0aa97059ca7d78a80abfac1941ad34e119f2 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Thu, 3 May 2012 00:22:10 -0700 Subject: [PATCH] disable useless warnings on MRI --- ext/v8/extconf.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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')