diff options
Diffstat (limited to 'test/rubygems/test_gem.rb')
-rw-r--r-- | test/rubygems/test_gem.rb | 15 |
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 |