diff --git a/spec/bundler/install/gemfile/git_spec.rb b/spec/bundler/install/gemfile/git_spec.rb index 9130483aa1..24cf30eadb 100644 --- a/spec/bundler/install/gemfile/git_spec.rb +++ b/spec/bundler/install/gemfile/git_spec.rb @@ -1279,7 +1279,6 @@ RSpec.describe "bundle install with git sources" do s.extensions = ["ext/extconf.rb"] s.write "ext/extconf.rb", <<-RUBY require "mkmf" - $extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"] create_makefile("foo") RUBY s.write "ext/foo.c", "void Init_foo() {}" diff --git a/spec/bundler/install/gems/native_extensions_spec.rb b/spec/bundler/install/gems/native_extensions_spec.rb index 51335272a9..907778a384 100644 --- a/spec/bundler/install/gems/native_extensions_spec.rb +++ b/spec/bundler/install/gems/native_extensions_spec.rb @@ -7,7 +7,6 @@ RSpec.describe "installing a gem with native extensions" do s.extensions = ["ext/extconf.rb"] s.write "ext/extconf.rb", <<-E require "mkmf" - $extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"] name = "c_extension_bundle" dir_config(name) raise "OMG" unless with_config("c_extension") == "hello" @@ -52,7 +51,6 @@ RSpec.describe "installing a gem with native extensions" do s.extensions = ["ext/extconf.rb"] s.write "ext/extconf.rb", <<-E require "mkmf" - $extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"] name = "c_extension_bundle" dir_config(name) raise "OMG" unless with_config("c_extension") == "hello" @@ -97,7 +95,6 @@ RSpec.describe "installing a gem with native extensions" do s.extensions = ["ext/extconf.rb"] s.write "ext/extconf.rb", <<-E require "mkmf" - $extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"] name = "c_extension_bundle_#{n}" dir_config(name) raise "OMG" unless with_config("c_extension_#{n}") == "#{n}" @@ -150,7 +147,6 @@ RSpec.describe "installing a gem with native extensions" do s.extensions = ["ext/extconf.rb"] s.write "ext/extconf.rb", <<-E require "mkmf" - $extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"] name = "c_extension_bundle" dir_config(name) raise "OMG" unless with_config("c_extension") == "hello" && with_config("c_extension_bundle-dir") == "hola" diff --git a/spec/bundler/support/builders.rb b/spec/bundler/support/builders.rb index 68e3bd7c7b..8727b9a0b6 100644 --- a/spec/bundler/support/builders.rb +++ b/spec/bundler/support/builders.rb @@ -494,8 +494,6 @@ module Spec write "ext/extconf.rb", <<-RUBY require "mkmf" - $extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"] - extension_name = "#{name}_c" if extra_lib_dir = with_config("ext-lib") # add extra libpath if --with-ext-lib is