Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Restore ARGV to fix test falure on ruby test-all

Restore ARGV properly, non-ascii strings in different encodings are not equal.
This should fix parallel test failure on ruby repository.

http://bugs.ruby-lang.org/issues/6673
[ruby-core:45975]
  • Loading branch information...
commit e8d1693cac4df24dc209fca709ea71aa33715377 1 parent d41bf95
@shirosaki shirosaki authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 test/rubygems/test_gem_installer.rb
View
5 test/rubygems/test_gem_installer.rb
@@ -766,7 +766,8 @@ def test_install_creates_binstub_that_dont_trust_encoding
exe = File.join @gemhome, 'bin', 'executable'
- ARGV.unshift "\xE4pfel".force_encoding("UTF-8")
+ extra_arg = "\xE4pfel".force_encoding("UTF-8")
+ ARGV.unshift extra_arg
begin
Gem::Specification.reset
@@ -775,7 +776,7 @@ def test_install_creates_binstub_that_dont_trust_encoding
instance_eval File.read(exe)
end
ensure
- ARGV.shift if ARGV.first == "\xE4pfel"
+ ARGV.shift if ARGV.first == extra_arg
end
assert_match(/ran executable/, e.message)
Please sign in to comment.
Something went wrong with that request. Please try again.