From b91da40c688854a3c4bbe53e6cb560dcfe55f6c7 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:46:20 +0200 Subject: [PATCH] Fix warning when executing `rubocop` with `bundle exec` `check_commit.rake` requires 'English' but when doing `bundle exec rubocop` this file will also be evaluated. ``` earlopain@DESKTOP-PC rubocop-ast]$ RUBYOPT=-w bundle exec rubocop -V /home/earlopain/Documents/rubocop-ast/rubocop-ast.gemspec:18: warning: global variable `$RS' not initialized 1.62.1 (using Parser 3.3.0.5, rubocop-ast 1.31.2, running on ruby 3.3.0) [x86_64-linux] - rubocop-performance 1.20.2 - rubocop-rspec 2.27.1 ``` --- rubocop-ast.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rubocop-ast.gemspec b/rubocop-ast.gemspec index b8c26a391..7a524d916 100644 --- a/rubocop-ast.gemspec +++ b/rubocop-ast.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |s| s.email = 'rubocop@googlegroups.com' s.files = `git ls-files lib LICENSE.txt README.md` - .split($RS) + %w[ + .lines(chomp: true) + %w[ lib/rubocop/ast/node_pattern/parser.racc.rb lib/rubocop/ast/node_pattern/lexer.rex.rb ]