Skip to content

Commit

Permalink
Improve error message for invalid parser_engine value
Browse files Browse the repository at this point in the history
  • Loading branch information
Earlopain committed Mar 8, 2024
1 parent 2514755 commit 38d880a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/ast/processed_source.rb
Expand Up @@ -29,7 +29,7 @@ def self.from_file(path, ruby_version, parser_engine: :parser_whitequark)
def initialize(source, ruby_version, path = nil, parser_engine: :parser_whitequark)
unless PARSER_ENGINES.include?(parser_engine)
raise ArgumentError, 'The keyword argument `parser_engine` accepts ' \
"`parser` or `parser_prism`, but `#{parser_engine}` was passed."
"`:parser_whitequark` or `:parser_prism`, but `#{parser_engine.inspect}` was passed."
end

# Defaults source encoding to UTF-8, regardless of the encoding it has
Expand Down

0 comments on commit 38d880a

Please sign in to comment.