diff --git a/lib/colorls/core.rb b/lib/colorls/core.rb index 7448e83..aa6a09b 100644 --- a/lib/colorls/core.rb +++ b/lib/colorls/core.rb @@ -317,7 +317,7 @@ module ColorLS line_array.push links if @hard_links_count line_array.push user_info(content) if @show_user line_array.push group_info(content.group) if @show_group - line_array.concat [size_info(content.size), mtime_info(content.mtime)] + line_array.push(size_info(content.size), mtime_info(content.mtime)) line_array.join(' ') end diff --git a/spec/color_ls/core_spec.rb b/spec/color_ls/core_spec.rb index 6cce9dd..907abbb 100644 --- a/spec/color_ls/core_spec.rb +++ b/spec/color_ls/core_spec.rb @@ -55,7 +55,7 @@ RSpec.describe ColorLS::Core do executable?: false ) - allow(::Dir).to receive(:entries).and_return([camera]) + allow(Dir).to receive(:entries).and_return([camera]) allow(ColorLS::FileInfo).to receive(:new).and_return(file_info) diff --git a/spec/color_ls/flags_spec.rb b/spec/color_ls/flags_spec.rb index 33d3c92..d4e8992 100644 --- a/spec/color_ls/flags_spec.rb +++ b/spec/color_ls/flags_spec.rb @@ -149,8 +149,8 @@ RSpec.describe ColorLS::Flags do end it 'returns no user / group info' do - allow(::Etc).to receive(:getpwuid).and_return(nil) - allow(::Etc).to receive(:getgrgid).and_return(nil) + allow(Etc).to receive(:getpwuid).and_return(nil) + allow(Etc).to receive(:getgrgid).and_return(nil) expect { subject }.to output(/\s+ \d+ \s+ \d+ .* a.txt/mx).to_stdout end @@ -338,7 +338,7 @@ RSpec.describe ColorLS::Flags do let(:args) { ['--snafu'] } it 'issues a warning, hint about `--help` and exit' do # rubocop:todo RSpec/MultipleExpectations - allow(::Kernel).to receive(:warn) do |message| + allow(Kernel).to receive(:warn) do |message| expect(message).to output '--snafu' end