-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Raise a more specific error when encountering an unknown magic comm…
- Loading branch information
Showing
4 changed files
with
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
module Parser | ||
## | ||
# {Parser::UnknownEncodingInMagicComment} is raised when a magic encoding | ||
# comment is encountered that the currently running Ruby version doesn't | ||
# recognize. It inherits from {ArgumentError} since that is the exception | ||
# Ruby itself raises when trying to execute a file with an unknown encoding. | ||
# As such, it is also not a {Parser::SyntaxError}. | ||
# | ||
# @api public | ||
# | ||
class UnknownEncodingInMagicComment < ArgumentError | ||
end | ||
end |
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