diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-11-11 11:07:26 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2021-11-11 14:00:05 +0900 |
commit | 6ecd30b402d02a51aef1ec48072ff4d103b7ef8f (patch) | |
tree | ec2a27301635c383d3afc57d0e5297ccb4e21aa6 /test/test_getoptlong.rb | |
parent | f5dcecf3456e5f52aa979cc2a59c5dc7b398e123 (diff) |
[ruby/getoptlong] Save the copy of `ARGV`
It refers the same object and will be replaced.
https://github.com/ruby/getoptlong/commit/5f57f47572
Diffstat (limited to 'test/test_getoptlong.rb')
-rw-r--r-- | test/test_getoptlong.rb | 2 |
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( |