each_arg method handle never happened cases
Open
@Fryguy is already working on this.
Since May 7, 2025.
technical debt
- Dominant language
- Ruby
- Stars
- 259
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
The only place to call `each_arg` return 0/1/param_size, I thought the below logic seems never be used:
https://github.com/ManageIQ/optimist/blob/master/lib/optimist.rb#L373
```
num_params_taken = yield args[i], params
if num_params_taken.nil?
remains << args[i]
if @stop_on_unknown
return remains += args[i + 1..-1]
end
else
i += num_params_taken
end
```
https://github.com/ManageIQ/optimist/blob/master/lib/optimist.rb#L594
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.