diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2018-07-10 18:46:29 -0700 |
---|---|---|
committer | Noah Kantrowitz <noah@coderanger.net> | 2018-07-10 18:46:29 -0700 |
commit | 41881272af33a831baec0c491565586cd5f1b77f (patch) | |
tree | b42a153a58a3c6ba1206c34435e262496825dfb0 /lib/chef/knife | |
parent | cac581165b5fb115b4a483f3fc1a84d361b08179 (diff) | |
download | chef-41881272af33a831baec0c491565586cd5f1b77f.tar.gz |
Don't mutate the argument because that makes debugging weird.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
Diffstat (limited to 'lib/chef/knife')
-rw-r--r-- | lib/chef/knife/core/subcommand_loader.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/knife/core/subcommand_loader.rb b/lib/chef/knife/core/subcommand_loader.rb index 026967d6ec..146411a399 100644 --- a/lib/chef/knife/core/subcommand_loader.rb +++ b/lib/chef/knife/core/subcommand_loader.rb @@ -139,6 +139,7 @@ class Chef # hash composed of the given words joined by the separator. # def find_longest_key(hash, words, sep = "_") + words = words.dup match = nil until match || words.empty? candidate = words.join(sep) |