diff --git a/lib/ldclient-rb/ldclient.rb b/lib/ldclient-rb/ldclient.rb index 60cd33e8..20ebeddf 100644 --- a/lib/ldclient-rb/ldclient.rb +++ b/lib/ldclient-rb/ldclient.rb @@ -203,10 +203,10 @@ def match_target?(target, user) return false end u_value = user[:custom][attrib] - if u_value.is_a? String or u_value.is_a? Numeric + if u_value.is_a? Array + return ! ((target[:values] & u_value).empty?) + else return target[:values].include? u_value - elsif u_value.is_a? Array - return ! ((target[:values] & u_value).empty?) end return false