diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-03-24 07:39:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-24 15:39:24 +0900 |
commit | 96064e6f1ce100a37680dc8f9509f06b3350e9c8 (patch) | |
tree | 798b59f015cb82ee3cd0427f80584032175829ba /test/rubygems/test_gem_commands_pristine_command.rb | |
parent | 930b012ad96bfb0bd12446b89407120744ef92eb (diff) | |
download | ruby-96064e6f1ce100a37680dc8f9509f06b3350e9c8.tar.gz |
Sync rubygems with current master (#2889)
Diffstat (limited to 'test/rubygems/test_gem_commands_pristine_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_pristine_command.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/rubygems/test_gem_commands_pristine_command.rb b/test/rubygems/test_gem_commands_pristine_command.rb index c40d32ae61..4ebe1efecb 100644 --- a/test/rubygems/test_gem_commands_pristine_command.rb +++ b/test/rubygems/test_gem_commands_pristine_command.rb @@ -160,9 +160,11 @@ class TestGemCommandsPristineCommand < Gem::TestCase ruby_exec = sprintf Gem.default_exec_format, 'ruby' - bin_env = win_platform? ? "" : %w(/usr/bin/env /bin/env).find {|f| File.executable?(f) } - - assert_match %r%\A#!\s*#{bin_env} #{ruby_exec}%, File.read(gem_exec) + if win_platform? + assert_match %r%\A#!\s*#{ruby_exec}%, File.read(gem_exec) + else + assert_match %r%\A#!\s*/usr/bin/env #{ruby_exec}%, File.read(gem_exec) + end end def test_execute_extensions_explicit |