-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#7842] Fix a false positive for
Lint/RaiseException
Resolve part of #7842. This PR fixes a false positive for `Lint/RaiseException` when raising Exception with explicit namespace. `Exception` belonging to a namespace is expected to inherit `StandardError`. This PR makes `Lint/RaiseException` aware of the following differences: ```ruby Gem::Exception.new.is_a?(StandardError) # => true Exception.new.is_a?(StandardError) # => false ``` On the other hand, the following case have not been resolved by this PR. ```ruby module Gem def self.foo raise Exception end end Gem.foo #=> Gem::Exception ``` The above case will be resolved separately from this PR.
- Loading branch information
Showing
3 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters