From 6ecd30b402d02a51aef1ec48072ff4d103b7ef8f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 11 Nov 2021 11:07:26 +0900 Subject: [ruby/getoptlong] Save the copy of `ARGV` It refers the same object and will be replaced. https://github.com/ruby/getoptlong/commit/5f57f47572 --- test/test_getoptlong.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_getoptlong.rb b/test/test_getoptlong.rb index f3f0812871..2d496e635c 100644 --- a/test/test_getoptlong.rb +++ b/test/test_getoptlong.rb @@ -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( -- cgit v1.2.3