Closed JuanitoFatas closed 4 years ago
Thank you! We were about to look into this but this saves us the trouble :)
I tried running the tests with this change on Ruby 2.5.1 and 2.6.5, and it didn't show a "private attribute?" warning (even with RUBYOPT=-w rake
), so it seems it's OK for at least those two as well.
We changed it to a guard :) https://github.com/barsoom/attr_extras/commit/1305e6cd4517ee7b6ebb31695099edd01e007a2a
Hello, this Pull Request has 2 changes:
Remove public since it does not generate "private attribute?" warnings and this also fixes for following warning
Check if names are not empty to fix following warning:
These calling without arguments warnings introduced by https://github.com/ruby/ruby/commit/2993b24a1ecc5fa3cc9f140bfd80669c3a3b7b9c from ruby bug tracker #13249.
I‘m not a fan of adding this
if
, but \_(ツ)_/.Open to better suggestion, thanks!