Skip to content

Commit 4fb230d

Browse files
committed
Remove unnecessary #to_s call
The `dirs` method returns an array of strings regardless of what was originally in the autoload paths. This type is documented: https://github.com/fxn/zeitwerk?tab=readme-ov-file#zeitwerkloaderdirs Note also that the #to_s call was not tested (you could not).
1 parent 5a68ecd commit 4fb230d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

railties/lib/rails/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def watchable_args # :nodoc:
413413
files, dirs = config.watchable_files.dup, config.watchable_dirs.dup
414414

415415
Rails.autoloaders.main.dirs.each do |path|
416-
dirs[path.to_s] = [:rb]
416+
dirs[path] = [:rb]
417417
end
418418

419419
[files, dirs]

0 commit comments

Comments
 (0)