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
This commit is contained in:
parent
26df05b2f8
commit
2301f983d2
@ -747,7 +747,8 @@ load Gem.bin_path('a', 'executable', version)
|
|||||||
|
|
||||||
exe = File.join @gemhome, 'bin', 'executable'
|
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
|
begin
|
||||||
Gem::Specification.reset
|
Gem::Specification.reset
|
||||||
@ -756,7 +757,7 @@ load Gem.bin_path('a', 'executable', version)
|
|||||||
instance_eval File.read(exe)
|
instance_eval File.read(exe)
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
ARGV.shift if ARGV.first == "\xE4pfel"
|
ARGV.shift if ARGV.first == extra_arg
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_match(/ran executable/, e.message)
|
assert_match(/ran executable/, e.message)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user