Skip to content

Loading…

Restore ARGV to fix test falure on ruby test-all #379

Merged
merged 1 commit into from

3 participants

@shirosaki

This was fixed in ruby repository at r37032.
I think upstream also should be fixed.

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]

@shirosaki shirosaki 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]
e8d1693
@kou kou merged commit 567cc47 into rubygems:master

1 check failed

Details default The Travis build failed
@kou

Thanks!
I've merged it!

@luislavena
RubyGems member
@kou

Can I do it?
I'm sorry but I don't know about 1.8 branch maintenance policy. Do you know about it? Or should I hear about it from @drbrain?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 27, 2012
  1. @shirosaki

    Restore ARGV to fix test falure on ruby test-all

    shirosaki committed
    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]
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)
Something went wrong with that request. Please try again.