summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/extmk.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index f4c5d47d20..c13c6e3f69 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -114,7 +114,7 @@ getopts('', 'extstatic', 'make:', 'make-flags:')
$force_static = $OPT['extstatic'] == 'static'
$make = $OPT['make'] || $make
$mflags = Shellwords.shellwords($OPT['make-flags'] || "")
-$mflags[0].sub!(/^[^-]/, '-\&') unless $mflags.empty?
+$mflags[0].sub!(/^\w+$/, '-\&') unless $mflags.empty?
$make, *$mflags[0, 0] = Shellwords.shellwords($make)
mflags = $mflags.grep(/^-([^-].*)/) {$1}.join