@notgrm I would not recommend doing this. It might work, but it's very confusing.
I generally think you shouldn't use === directly, only as part of a case expression (where this behaviour makes more sense).
Another option is also to use [], like missing_or_wildcard[filters[:country]].
Although in this case I'd usually just break out missing_or_wildcard into a method, so you can write the most obvious code.
As a more crazy option, you can do something like this to avoid needing the helper at all, by factoring out the whole loop:
base_scope.where([:country, :recipient, :sender].index_with { filters[it] unless filters[it].in?(['*', nil]) }.compact)
I've left it in one line for ease of tooting, but obviously you could break it out more.