You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes false positives for `Rails/CompactBlank`
when using `collection.reject!`.
`reject!(&:blank?)` is not equivalent to `compact_blank!`:
```ruby
{}.reject!(&:blank?) # => nil
{}.reject! { |_k, v| v.blank? } # => nil
{}.compact_blank! # => {}
```
This PR prioritizes safer behavior with plain hashes and arrays.
*[#1313](https://github.com/rubocop/rubocop-rails/pull/1313): Fix false positives for `Rails/CompactBlank` when using `collection.reject!`. ([@koic][])
0 commit comments