From 2b1c46c3b1955cba5a5820e05f8637d203f7f6ce Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Thu, 14 Mar 2024 19:51:21 +0100 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 ``` --- CHANGELOG.md | 5 +++++ rubocop-ast.gemspec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55a043b3a..b4f08d929 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## master (unreleased) +### Bug fixes + +* [#288](https://github.com/rubocop/rubocop-ast/pull/288): Fix a Ruby warning (`RUBYOPT=-w`) when doing `bundle exec rubocop` during `rubocop-ast` development. ([@Earlopain][]) + ## 1.31.2 (2024-03-08) ### Bug fixes @@ -451,3 +455,4 @@ [@tdeo]: https://github.com/tdeo [@ydah]: https://github.com/ydah [@sambostock]: https://github.com/sambostock +[@Earlopain]: https://github.com/Earlopain diff --git a/rubocop-ast.gemspec b/rubocop-ast.gemspec index 7d79bfd7e..99cf3f375 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[ + .split($/) + %w[ lib/rubocop/ast/node_pattern/parser.racc.rb lib/rubocop/ast/node_pattern/lexer.rex.rb ]