Skip to content
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

🌈 Fix another warning about $thor_runner #718

Merged
merged 1 commit into from
Mar 6, 2020

Conversation

bpo
Copy link
Contributor

@bpo bpo commented Mar 5, 2020

Last patch for me today - this was what I was originally trying to do:

Previously ruby -w, when running an unknown command in Thor, a warning was
printed:

thor-1.0.1/lib/thor/base.rb:514: warning: global variable `$thor_runner' not initialized

This was raised earlier in #633 but the fix was incomplete -- the global variable was being lazily defined in a method which is not the only entry point to Thor. This moves the global definition out to where the Thor class is defined.

Previously `ruby -w`, when running an unknown command in Thor, a warning was
printed:

    thor-1.0.1/lib/thor/base.rb:514: warning: global variable `$thor_runner' not initialized

The global variable was being lazily defined in a method which is not
the only entry point to Thor. This moves the global definition out to
where the Thor class is defined.
@rafaelfranca rafaelfranca merged commit 0e5efb8 into rails:master Mar 6, 2020
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