local-ch / lhc

🚀 Advanced HTTP Client for Ruby. Fueled with interceptors.
GNU General Public License v3.0
43 stars 1 forks source link

The usage of OpenStruct #206

Open dimameshcharakou opened 2 years ago

dimameshcharakou commented 2 years ago

The ruby maintainers started to recommend not using OpenStruct https://docs.ruby-lang.org/en/3.0.0/OpenStruct.html#class-OpenStruct-label-Caveats

Also the related rule was added to rubocop: https://docs.rubocop.org/rubocop/cops_style.html#styleopenstructuse ATM, it's disabled: https://github.com/local-ch/lhc/pull/205/files#diff-4f894049af3375c2bd4e608f546f8d4a0eed95464efcdea850993200db9fef5cR274

It might make sense to think about replacing OpenStruct with Struct or Hash.