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 verbose compile warnings #24

Merged
merged 3 commits into from
Mar 23, 2021

Conversation

jeremyevans
Copy link
Contributor

Most of these warnings are harmless, but the first two commits are places where the verbose compile warnings pointed out what appear to be bugs in the library. At least those two commits would benefit from review.

This was found via a verbose warning.  @tpath would always be nil
in the previous code, so attempting to initialize a
Tk::TkTable::CellTag should have always raised a NoMethodError.
…for_cb_class

If cmd was passed a string, this set an unused local variable,
when the apparent intent was to set an instance variable.  Found
via a verbose warning.
Most of these are due to:

* unused local variables
* space before method argument list
* space missing between binary operators

In a couple cases where there was an unused local variable that
looks like the expression itself wasn't needed, this removes the
entire line.

In one case, there are duplicate when arguments, such as "x" and ?x.
These were different in Ruby 1.8, and I'm guessing the desired
behavior is either "x" or ?x.ord, since that is the equivalent of
the Ruby 1.8 code.
@jeremyevans
Copy link
Contributor Author

I plan to commit this next week unless I hear objections.

@jeremyevans jeremyevans merged commit 105ecc1 into ruby:master Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant