Spec-Zone.ru › Ruby 3.4
  1. Prism::
  2. Pattern::
  3. CompilationError

class Prism::Pattern::CompilationError

Родительский класс:
StandardError

Возникает, если запрос, переданный шаблону, содержит недопустимый синтаксис Ruby или использует синтаксис, который пока не поддерживается.

Публичные методы класса

new (repr) Показать исходный код
# 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.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API