class Prism::Pattern::CompilationError
Возникает, если запрос, переданный шаблону, содержит недопустимый синтаксис Ruby или использует синтаксис, который пока не поддерживается.
Публичные методы класса
# File lib/prism/pattern.rb, line 44
def initialize(repr)
super(<<~ERROR)
prism was unable to compile the pattern you provided into a usable
expression. It failed on to understand the node represented by:
#{repr}
Note that not all syntax supported by Ruby's pattern matching syntax
is also supported by prism's patterns. If you're using some syntax
that you believe should be supported, please open an issue on
GitHub at https://github.com/ruby/prism/issues/new.
ERROR
end Создаёт новый объект CompilationError с заданным представлением узла, вызвавшего ошибку.
Вызывает метод суперкласса
Exception::new
Ruby Core © 1993–2025 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.