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

Cleanup: Initialize instance variable before use to avoid Ruby warnings #882

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

olleolleolle
Copy link
Contributor

Description

This avoids a Ruby warning emitted on use.

By initializing the variable before use, this is an easy win against the sea of warnings output.

Testing

  1. Run the test with RUBYOPT=-W2
  2. See that @decorated_collection is not among the output

@n-rodriguez
Copy link
Contributor

Hi there! Any news?

@n-rodriguez
Copy link
Contributor

Ping @codebycliff

@n-rodriguez
Copy link
Contributor

@olleolleolle can you please rebase your branch on master?

@olleolleolle
Copy link
Contributor Author

olleolleolle commented Jan 21, 2021

I could make an attempt, in about 12 hours.

But I can hit the Update Branch button right now. If green, you could Squash commits Into One Commit, using the merge button variant for that.

@olleolleolle
Copy link
Contributor Author

olleolleolle commented Jan 21, 2021

Haha, the issue is created by: me defining a variable, so the test must be altered to match that new situation!

Update: I updated the test, changing it to match the current code.

  - this avoids a Ruby warning
@olleolleolle olleolleolle force-pushed the avoid-uninitialized-instance-variable-decorated-collection branch from 5431559 to 58b4442 Compare January 22, 2021 12:31
@n-rodriguez
Copy link
Contributor

@olleolleolle thank you! Ping @codebycliff

@olleolleolle olleolleolle changed the title Initialize instance variable before use Cleanup: Initialize instance variable before use to avoid Ruby warnings Jan 22, 2021
@n-rodriguez
Copy link
Contributor

ping @codebycliff

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.

None yet

2 participants