Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix warning: attribute accessor as module_function (#1138)
When Running rspec with --warnings enabled a warning is emitted by the rollbar gem. ``` $ rspec --warnings /my/path/ruby-3.2.2/gems/rollbar-3.4.1/lib/rollbar/json.rb:8: warning: attribute accessor as module_function ``` This is caused by the line ``` attr_writer :options_module ``` Within [lib/rollbar/json.rb](https://github.com/rollbar/rollbar-gem/blob/8c6a9e94629c0a8b964f0a3b13eab742c3800841/lib/rollbar/json.rb#L8) 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 (accidentally?) 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. Fixes: #1108
- Loading branch information