jhund / filterrific

Filterrific is a Rails Engine plugin that makes it easy to filter, search, and sort your ActiveRecord lists.
http://filterrific.clearcove.ca
MIT License
910 stars 124 forks source link

Deprecated warning part2 #212

Closed jirubio closed 4 months ago

jirubio commented 2 years ago

I'm getting this warning when executing filterrific with ruby 3: param_set.rb:99: warning: deprecated Object#=~ is called on Integer; it always returns nil Looking at past issues I have found a similar issue that was fixed in line 104 https://github.com/jhund/filterrific/commit/2488ef50c47e0fb4271fd244cd1384d5bdccb211 Looks like line 99 uses the same pattern and can also be fixed with the same patch: fp[key] = fp[key].map { |e| e.is_a?(String) && e =~ integer_detector_regex ? e.to_i : e }