Permalink
Browse files

Merge pull request #379 from shirosaki/fix_test

Restore ARGV to fix test falure on ruby test-all

See also [ruby-core:45975] and http://bugs.ruby-lang.org/issues/6673.

Patch by Hiroshi Shirosaki. Thanks!!!
  • Loading branch information...
2 parents d41bf95 + e8d1693 commit 567cc479405d91511ba1d9128be6dc095f60fc1e @kou kou committed Sep 27, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 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)

0 comments on commit 567cc47

Please sign in to comment.