summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-12-20 11:50:32 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-12-20 11:50:32 +0900
commite672494cd737b8fea3a186aeb5c2c17d1a18cb96 (patch)
tree7c10a5af0630284fc69342e9598a3c0176e0b27c /test/rubygems/test_gem.rb
parentfac60be324260cd834478fedf934e59b97935dbf (diff)
Merge RubyGems 3.1.2
Diffstat (limited to 'test/rubygems/test_gem.rb')
-rw-r--r--test/rubygems/test_gem.rb15
1 files changed, 5 insertions, 10 deletions
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index a0debb488c..6d223b7d69 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -1917,16 +1917,11 @@ You may need to `gem install -g` to install missing gems
end
def with_bindir_and_exeext(bindir, exeext)
- orig_bindir = RbConfig::CONFIG['bindir']
- orig_exe_ext = RbConfig::CONFIG['EXEEXT']
-
- RbConfig::CONFIG['bindir'] = bindir
- RbConfig::CONFIG['EXEEXT'] = exeext
-
- yield
- ensure
- RbConfig::CONFIG['bindir'] = orig_bindir
- RbConfig::CONFIG['EXEEXT'] = orig_exe_ext
+ bindir(bindir) do
+ exeext(exeext) do
+ yield
+ end
+ end
end
def with_clean_path_to_ruby