Project

General

Profile

Actions

Defect #42606

closed

RuboCop warning about deprecated `EnsureNode#body` with rubocop-ast >= 1.41

Added by Go MAEDA about 17 hours ago. Updated about 17 hours ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Gems support
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When running RuboCop on Redmine 6.0-stable and 5.1-stable with `rubocop-ast` 1.41.0 or later, the following warning appears:

`EnsureNode#body` is deprecated and will be changed in the next major version of rubocop-ast. Use `EnsureNode#branch` instead to get the body of the `ensure` branch.

The warning does not appear if `rubocop-ast` is pinned to version 1.40.x.

Index: Gemfile
===================================================================
--- Gemfile    (revision 23680)
+++ Gemfile    (working copy)
@@ -111,6 +111,7 @@
   gem 'selenium-webdriver', '>= 4.11.0'
   # RuboCop
   gem 'rubocop', '~> 1.68.0', require: false
+  gem 'rubocop-ast', '~> 1.40.0'
   gem 'rubocop-performance', '~> 1.22.0', require: false
   gem 'rubocop-rails', '~> 2.27.0', require: false
   gem 'bundle-audit', require: false
Actions

Also available in: Atom PDF