-
-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Expected behavior
Running rubocop with Performance/StringIdentifierArgument enabled on a file that uses https://github.com/jeremyevans/rack-unreloader should not autocorrect the parameters to Unreloader.autoload to symbols.
Actual behavior
The Performance/StringIdentifierArgument turns the string path argument to Unreloader.autoload to a symbol, which causes exception:
<internal:dir>:220:in `glob': no implicit conversion of Symbol into String (TypeError)
from /Users/dave/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rack-unreloader-2.1.0/lib/rack/unreloader.rb:31:in `block in expand_paths'
Steps to reproduce the problem
I started with https://github.com/jeremyevans/roda-sequel-stack/, followed the README to setup my app:
git clone https://github.com/jeremyevans/roda-sequel-stack.git my_app
cd my_app
rake "setup[MyApp]"
Then I added the standard gem, which enables the Performance/StringIdentifierArgument cop, and noticed the incorrect autocorrect.
RuboCop version
$ bundle exec rubocop -V
1.44.1 (using Parser 3.2.1.1, rubocop-ast 1.27.0, running on ruby 3.2.1) [arm64-darwin22]
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working