Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit dc6a9bc

Browse files
committed
Turn a #map into #each where the return value is unused
The return value of RubyProject.add_to_load_path is neither useful nor used anywhere. In this case, #each communicates intent better than #map.
1 parent 19761e3 commit dc6a9bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rspec/core/ruby_project.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Core
66
# @private
77
module RubyProject
88
def add_to_load_path(*dirs)
9-
dirs.map { |dir| add_dir_to_load_path(File.join(root, dir)) }
9+
dirs.each { |dir| add_dir_to_load_path(File.join(root, dir)) }
1010
end
1111

1212
def add_dir_to_load_path(dir)

0 commit comments

Comments
 (0)