diff options
| -rwxr-xr-x | win32/mkexports.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/win32/mkexports.rb b/win32/mkexports.rb index a69ba528d4..f099f621e5 100755 --- a/win32/mkexports.rb +++ b/win32/mkexports.rb @@ -144,7 +144,11 @@ end class Exports::Cygwin < Exports def self.nm - @@nm ||= RbConfig::CONFIG["NM"] + @@nm ||= + begin + require 'shellwords' + RbConfig::CONFIG["NM"].shellsplit + end end def exports(*) @@ -152,7 +156,9 @@ class Exports::Cygwin < Exports end def each_line(objs, &block) - IO.foreach("|#{self.class.nm} --extern-only --defined-only #{objs.join(' ')}", &block) + IO.popen([*self.class.nm, *%w[--extern-only --defined-only], *objs]) do |f| + f.each(&block) + end end def each_export(objs) |
