Refactor join("") to join.

This commit is contained in:
Markus Reiter 2018-06-14 22:48:37 +02:00
parent 13d9305fad
commit 44f56a0773
5 changed files with 5 additions and 5 deletions

View File

@ -460,7 +460,7 @@ module RuboCop
when :str
node.str_content
when :dstr
node.each_child_node(:str).map(&:str_content).join("")
node.each_child_node(:str).map(&:str_content).join
when :const
node.const_name
when :sym

View File

@ -148,7 +148,7 @@ describe "download strategies", :cask do
"DBw2KdR24q9t1wfjS9LUzelf5TWk6ojj8p9%2FHjl%2Fi%2FVCXN",
"N4o1mW%2FMayy2tTY1qcC%2FTmqI1ulZS8SNuaSgr9Iys9oDF1%2",
"BPK%2B4Sg==",
].join("")
].join
end
describe "#tarball_path" do

View File

@ -20,7 +20,7 @@ describe Hbc::DSL, :cask do
}
it "prints a warning that it has encountered an unexpected method" do
expected = Regexp.compile(<<~EOS.lines.map(&:chomp).join(""))
expected = Regexp.compile(<<~EOS.lines.map(&:chomp).join)
(?m)
Warning:
.*

View File

@ -134,7 +134,7 @@ describe Hbc::Pkg, :cask do
<string>#{volume}</string>
<key>paths</key>
<dict>
#{(pkg_files + pkg_directories).map { |f| "<key>#{f}</key><dict></dict>" }.join("")}
#{(pkg_files + pkg_directories).map { |f| "<key>#{f}</key><dict></dict>" }.join}
</dict>
</dict>
</plist>

View File

@ -109,7 +109,7 @@ describe Hbc::SystemCommand, :cask do
end
it "echoes only STDOUT" do
expected = [1, 3, 5].map { |i| "#{i}\n" }.join("")
expected = [1, 3, 5].map { |i| "#{i}\n" }.join
expect {
described_class.run(command, options)
}.to output(expected).to_stdout