Skip to content
Permalink
Browse files
fixed handling of all and none limits
  • Loading branch information
bartekgorny committed May 7, 2019
1 parent 429d056 commit b1ccc7bac302b3c76ac4a5664b9a147d1460a303
Showing 1 changed file with 2 additions and 0 deletions.
@@ -131,6 +131,8 @@ store_pattern(Label, Pattern, Limit) ->
ets:insert(patterns_table_name(), {Label, prepare_pattern(Pattern), prepare_limit(Limit)}),
ok.

prepare_limit(all) -> all;
prepare_limit(none) -> none;
prepare_limit(Limit) when is_binary(Limit) -> [Limit];
prepare_limit(Limit) when is_atom(Limit) -> [Limit];
prepare_limit(Limit) when is_list(Limit) -> Limit.

0 comments on commit b1ccc7b

Please sign in to comment.