Closed cih closed 6 years ago
Whoo, this is old. Sorry about that.
As to the functionality, I'd prefer to not handle return codes this way. I believe that if you want a particular value, you should specify that value. The same way you that an unspecified rescue
is bad (or, worse, rescue Exception
), I don't want failing commands to accidentally be allowed. Users should be mindful of what error conditions are acceptable.
This change allows
expected_outcodes
to be passed as aRange
. Previously this would fail asjoin
was called when formatting the output message returning an undefined method error.NoMethodError: undefined method 'join' for 0..1:Range