diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-09-25 02:14:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-09-25 02:14:18 +0000 |
commit | 2301f983d2bd7edc5c36352e97b8028dc4c4bc24 (patch) | |
tree | 8a26d953fb06a6a92ecf490a42b3edc20cf4dde5 /test/rubygems/test_gem_installer.rb | |
parent | 26df05b2f80c47c080b01b2c23623d5aabba0321 (diff) | |
download | ruby-2301f983d2bd7edc5c36352e97b8028dc4c4bc24.tar.gz |
test_gem_installer.rb: restore ARGV
* test/rubygems/test_gem_installer.rb
(TestGemInstaller#test_install_creates_binstub_that_dont_trust_encoding):
restore ARGV properly, non-ascii strings in different encodings are
not equal. [ruby-core:45975] [Bug #6673]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_installer.rb')
-rw-r--r-- | test/rubygems/test_gem_installer.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 848151eeef..33950ad46c 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -747,7 +747,8 @@ load Gem.bin_path('a', 'executable', version) 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 @@ -756,7 +757,7 @@ load Gem.bin_path('a', 'executable', version) 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) |