mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 11:33:58 +02:00
[ruby/getoptlong] Save the copy of ARGV
It refers the same object and will be replaced.
5f57f47572
This commit is contained in:
parent
f5dcecf345
commit
6ecd30b402
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ class TestGetoptLong < Test::Unit::TestCase
|
||||||
|
|
||||||
def verify(test_argv, expected_remaining_argv, expected_options)
|
def verify(test_argv, expected_remaining_argv, expected_options)
|
||||||
# Save ARGV and replace it with a test ARGV.
|
# Save ARGV and replace it with a test ARGV.
|
||||||
argv_saved = ARGV
|
argv_saved = ARGV.dup
|
||||||
ARGV.replace(test_argv)
|
ARGV.replace(test_argv)
|
||||||
# Define options.
|
# Define options.
|
||||||
opts = GetoptLong.new(
|
opts = GetoptLong.new(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue