summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-01-17 19:39:27 +0900
committerNobuyoshi Nakada <nobu.nakada@gmail.com>2025-09-17 22:42:49 +0900
commitb034a3df6872fd38adf924b9f9f74ac245302f95 (patch)
treeb51fad40739a2d1e339e00e128b1c9d9282cbdf8
parentdd69a75f2abfe280a62545a4f827bca4d2df1789 (diff)
bundled_gems_spec.rb: Remove useless `map`
`Dir.[]` returns list of strings, `map(&:to_s)` does nothing.
-rw-r--r--spec/bundled_gems_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/bundled_gems_spec.rb b/spec/bundled_gems_spec.rb
index c362881850..8014a48223 100644
--- a/spec/bundled_gems_spec.rb
+++ b/spec/bundled_gems_spec.rb
@@ -31,7 +31,7 @@ RSpec.configure do |config|
FileUtils.cp_r Spec::Path.pristine_system_gem_path, Spec::Path.system_gem_path
FileUtils.mkdir_p Spec::Path.base_system_gem_path.join("gems")
%w[sinatra rack tilt rack-protection rack-session rack-test mustermann base64 logger compact_index].each do |gem|
- path = Dir[File.expand_path("../.bundle/gems/#{gem}-*", __dir__)].map(&:to_s).first
+ path, = Dir[File.expand_path("../.bundle/gems/#{gem}-*", __dir__)]
FileUtils.cp_r path, Spec::Path.base_system_gem_path.join("gems")
end