Skip to content

🌈 Fix another warning about $thor_runner#718

Merged
rafaelfranca merged 1 commit into
rails:masterfrom
bpo:fix-verbose-warnings
Mar 6, 2020
Merged

🌈 Fix another warning about $thor_runner#718
rafaelfranca merged 1 commit into
rails:masterfrom
bpo:fix-verbose-warnings

Conversation

@bpo

@bpo bpo commented Mar 5, 2020

Copy link
Copy Markdown
Contributor

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