Fix warning: attribute accessor as module_function #1138
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
When Running rspec with --warnings enabled a warning is emitted by the rollbar gem.
This is caused by the line
Within lib/rollbar/json.rb
The line was introduced here, when there was a more complicated way of configuring the json parser.
e33f10e#diff-9e64389290ff8e4e50cba9436521333bdd3307baa63ed84b74f0f9b28a6cfceaR13
However in 2019 this code was removed, and replaced with Ruby's JSON module
de45e80#diff-9e64389290ff8e4e50cba9436521333bdd3307baa63ed84b74f0f9b28a6cfceaL39-L41
But the attr_writer was not removed.
As the
options_module
attribute writer is not documented or referenced anywhere else in the project I believe it can be removed.This commit removes the unused
attr_writer
and fixes the warning.Type of change
Related issues
Checklists
Development
Code review