lib/flipper/adapters/redis.rb in flipper-redis-0.6.0 vs lib/flipper/adapters/redis.rb in flipper-redis-0.6.1
- old
+ new
@@ -125,10 +125,10 @@
# Private: Returns a set of values given an array of fields and a gate.
#
# Returns a Set of the values enabled for the gate.
def fields_to_gate_value(fields, gate)
- regex = /^#{Regexp.escape(gate.key)}\//
+ regex = /^#{Regexp.escape(gate.key.to_s)}\//
keys = fields.grep(regex)
values = keys.map { |key| key.split('/', 2).last }
values.to_set
end