summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-11-11 11:07:26 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-11-11 14:00:05 +0900
commit6ecd30b402d02a51aef1ec48072ff4d103b7ef8f (patch)
treeec2a27301635c383d3afc57d0e5297ccb4e21aa6
parentf5dcecf3456e5f52aa979cc2a59c5dc7b398e123 (diff)
[ruby/getoptlong] Save the copy of `ARGV`
It refers the same object and will be replaced. https://github.com/ruby/getoptlong/commit/5f57f47572
-rw-r--r--test/test_getoptlong.rb2
1 files changed, 1 insertions, 1 deletions
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(