diff --git a/ext/win32ole/extconf.rb b/ext/win32ole/extconf.rb index c3717316d4..1a17524d0a 100644 --- a/ext/win32ole/extconf.rb +++ b/ext/win32ole/extconf.rb @@ -30,6 +30,7 @@ end case RUBY_PLATFORM when /mswin/ - $CFLAGS += ' /W3' + $CFLAGS.sub!(/((?:\A|\s)[-\/])W\d(?=\z|\s)/, '\1W3') or + $CFLAGS += ' -W3' end create_win32ole_makefile