Skip to content

Commit

Permalink
Update attack.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshields authored Nov 20, 2023
1 parent b8f51d0 commit a854656
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/rack/attack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ def reset!
end

def allow_error?(error)
allowed_errors&.any? do |ignored_error|
case ignored_error
when String then error.class.ancestors.any? {|a| a.name == ignored_error }
else error.is_a?(ignored_error)
allowed_errors&.any? do |allowed_error|
case allowed_error
when String then error.class.ancestors.any? {|a| a.name == allowed_error }
else error.is_a?(allowed_error)
end
end
end
Expand Down

0 comments on commit a854656

Please sign in to comment.