1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/getoptlong] Save the copy of ARGV

It refers the same object and will be replaced.

https://github.com/ruby/getoptlong/commit/5f57f47572
This commit is contained in:
Nobuyoshi Nakada 2021-11-11 11:07:26 +09:00 committed by Hiroshi SHIBATA
parent f5dcecf345
commit 6ecd30b402

View file

@ -5,7 +5,7 @@ class TestGetoptLong < Test::Unit::TestCase
def verify(test_argv, expected_remaining_argv, expected_options)
# Save ARGV and replace it with a test ARGV.
argv_saved = ARGV
argv_saved = ARGV.dup
ARGV.replace(test_argv)
# Define options.
opts = GetoptLong.new(