If a default argument for a Thor::Option | Thor::Argument is provided, the option/argument constructor will call:
@assigns[argument.human_name] = argument.default
This aliases, and does not create a copy of, argument.default to @assigns[argument.human_name]. So now every time we update @assigns, we are also mutating argument.default. This was never a problem before because, without a repeatable flag, we'd never encounter a failure mode.
Following work on https://github.com/Shopify/krane/issues/697, I discovered a subtle bug that is now causing issues with the repeatable flag feature.
If a default argument for a
Thor::Option | Thor::Argument
is provided, the option/argument constructor will call:This aliases, and does not create a copy of,
argument.default
to@assigns[argument.human_name]
. So now every time we update@assigns
, we are also mutatingargument.default
. This was never a problem before because, without a repeatable flag, we'd never encounter a failure mode.TODO