summaryrefslogtreecommitdiff
path: root/lib/rubygems/ext/ext_conf_builder.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2021-07-25 16:11:18 +0200
committerHiroshi SHIBATA <[email protected]>2021-07-27 09:25:56 +0900
commit9cddc0ec94806b9f6850e0206f5cefd5ca5e5362 ()
tree63861f7fcb1951764767d108056a7aec5eb69d4e /lib/rubygems/ext/ext_conf_builder.rb
parent9ac89fe35e0ddbf28be436c275e1de5287e35c23 (diff)
[rubygems/rubygems] Lazily load `shellwords` library
https://.com/rubygems/rubygems/commit/e5532ef886
-rw-r--r--lib/rubygems/ext/ext_conf_builder.rb3
1 files changed, 1 insertions, 2 deletions
@@ -5,8 +5,6 @@
# See LICENSE.txt for permissions.
#++
-require 'shellwords'
-
class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
def self.build(extension, dest_path, results, args=[], lib_dir=nil, extension_dir=Dir.pwd)
require 'fileutils'
@@ -40,6 +38,7 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
begin
# workaround for https://.com/oracle/truffleruby/issues/2115
siteconf_path = RUBY_ENGINE == "truffleruby" ? siteconf.path.dup : siteconf.path
cmd = Gem.ruby.shellsplit << "-I" << File.expand_path("../../..", __FILE__) <<
"-r" << get_relative_path(siteconf_path, extension_dir) << File.basename(extension)
cmd.push(*args)