From ae124b9cba33feaff5e75e395e221ba994dcb71d Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sat, 23 Jul 2022 13:21:51 +0900 Subject: [PATCH] Use Ruby 3.1 parser for docs Follow up https://github.com/rubocop/rubocop/commit/32db181 --- tasks/cops_documentation.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/cops_documentation.rake b/tasks/cops_documentation.rake index 6be2a099ad..e82c414253 100644 --- a/tasks/cops_documentation.rake +++ b/tasks/cops_documentation.rake @@ -22,7 +22,7 @@ end desc 'Syntax check for the documentation comments' task documentation_syntax_check: :yard_for_generate_documentation do - require 'parser/ruby30' + require 'parser/ruby31' ok = true YARD::Registry.load! @@ -37,7 +37,7 @@ task documentation_syntax_check: :yard_for_generate_documentation do examples.to_a.each do |example| buffer = Parser::Source::Buffer.new('', 1) buffer.source = example.text - parser = Parser::Ruby30.new(RuboCop::AST::Builder.new) + parser = Parser::Ruby31.new(RuboCop::AST::Builder.new) parser.diagnostics.all_errors_are_fatal = true parser.parse(buffer) rescue Parser::SyntaxError => e