From ce0de3f67b573957d15e8945784a0d4413c32734 Mon Sep 17 00:00:00 2001 From: eban Date: Tue, 26 Mar 2002 10:46:30 +0000 Subject: [PATCH] * ext/extmk.rb.in (arg_config): should use Shellwords::shellwords. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 2 ++ ext/extmk.rb.in | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e86e80144f..b1d84a9039 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ Tue Mar 26 18:45:15 2002 WATANABE Hirofumi * configure.in (FILE_READPTR): check bufread instead of bufend for uClibc. + + * ext/extmk.rb.in (arg_config): should use Shellwords::shellwords. Tue Mar 26 01:56:33 2002 Yukihiro Matsumoto diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 21166059b2..f191af7678 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -41,6 +41,7 @@ $:.replace [$topdir, $top_srcdir, $top_srcdir+"/lib", "."] require 'rbconfig.rb' require 'find' require 'ftools' +require 'shellwords' def rm_f(*files) targets = [] @@ -296,8 +297,7 @@ def arg_config(config, default=nil) if /mswin32|mingw/ =~ RUBY_PLATFORM and ENV["CONFIGURE_ARGS"] args << " " << ENV["CONFIGURE_ARGS"] end - for arg in args.split - arg.gsub! /^'|'$/, '' + for arg in Shellwords::shellwords(args) next unless /^--/ =~ arg arg, val = arg.split('=', 2) $configure_args[arg] = val || true