Skip to content

Don't mess with global constants#17

Open
RuhmUndAnsehen wants to merge 1 commit intoruby:masterfrom
RuhmUndAnsehen:leave_argv_alone
Open

Don't mess with global constants#17
RuhmUndAnsehen wants to merge 1 commit intoruby:masterfrom
RuhmUndAnsehen:leave_argv_alone

Conversation

@RuhmUndAnsehen
Copy link
Copy Markdown
Contributor

Instances of GetoptLong reference the global constants ARGV and ENV, happily modifying the first one.

This seems to defeat the purpose of OOP and makes testing changes harder. This PR gives the programmer the option to explicitly pass a custom argv and env.

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.

1 participant