Skip to content

#load() into hash #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 29, 2022
Merged

#load() into hash #42

merged 3 commits into from
Oct 29, 2022

Conversation

5long
Copy link
Contributor

@5long 5long commented Oct 10, 2022

I'm trying to use OptionParser in my personal scripts. I'd like to parse arguments both from config file and ARGV. Ideally I want to just write code like this which doesn't work yet. But it certainly feels "right" to have a consistent interface of accepting the keyword argument into: {} among #parse, #order and #load.

Thus this pull request.

@5long 5long changed the title Load into hash #load() into hash Oct 10, 2022
@nobu nobu merged commit 2ea626f into ruby:master Oct 29, 2022
matzbot pushed a commit to ruby/ruby that referenced this pull request Oct 29, 2022
(ruby/optparse#42)

OptionParser#load learns .load(into: Hash)

ruby/optparse@2ea626fcff

Co-authored-by: Nobuyoshi Nakada <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants