You cannot let a method return multiple values. In order to do what you want, you have to change has_selector?
, maybe something like this:
alias old_has_selector? :has_selector?
def has_selector? arg
case arg
when Array then old_has_selector?(*arg)
else old_has_selector?(arg)
end
end