Skip to content

Commit

Permalink
Fix use of Ruby 2.5+ syntax
Browse files Browse the repository at this point in the history
any? doesn't take a Regexp on most of our supported versions
  • Loading branch information
imjoehaines committed May 15, 2020
1 parent 27c5b4d commit 25a16ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bugsnag/middleware/ignore_error_class.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def call(report)
when Proc then to_ignore.call(ex)
when Class then ancestor_chain.include?(to_ignore)
when String then ancestor_chain_strings.include?(to_ignore)
when Regexp then ancestor_chain_strings.any?(to_ignore)
when Regexp then ancestor_chain_strings.any? { |ancestor| to_ignore =~ ancestor }
else false
end
end
Expand Down

0 comments on commit 25a16ce

Please sign in to comment.