Skip to content

Commit

Permalink
Fixed nil error on enumerator
Browse files Browse the repository at this point in the history
* Converted key.codepoints to an array
  • Loading branch information
franee committed Nov 9, 2016
1 parent 94ef83e commit f7773fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redis-audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def group_key(key, type)
length_of_best_match = 0
threshold = key.length / 3
matching_portion = nil
key_codepoints = key.codepoints
key_codepoints = key.codepoints.to_a

@keys.keys.each do |current_key|
next if matching_key && !current_key.start_with?(matching_portion) # we know it wont be longer
Expand Down

0 comments on commit f7773fe

Please sign in to comment.