Skip to content

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