Skip to content

Commit 88219b1

Browse files
committed
Fix build, due to Rubocop error
Fixes the error: ``` Offenses: test/roundtrip/test_rubyc.rb:33:31: C: [Correctable] Style/HashConversion: Prefer literal hash to Hash[key: value, ...]. parsed_line = Hash[timestamp: Time.now, line: raw_line.to_s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/roundtrip/test_rubyc.rb:40:31: C: [Correctable] Style/HashConversion: Prefer literal hash to Hash[key: value, ...]. parsed_line = Hash[timestamp: Time.now, line: raw_line.to_s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 11 files inspected, 2 offenses detected, 2 offenses auto-correctable Error: Process completed with exit code 1. ``` which breaks the build.
1 parent 677baf2 commit 88219b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/roundtrip/test_rubyc.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ def ruby(*args)
3030

3131
Thread.new do
3232
until (raw_line = stdout.gets).nil?
33-
parsed_line = Hash[timestamp: Time.now, line: raw_line.to_s]
33+
parsed_line = { timestamp: Time.now, line: raw_line.to_s }
3434
$stdout.puts "rubyc's ruby STDOUT: #{parsed_line}"
3535
end
3636
end
3737

3838
Thread.new do
3939
until (raw_line = stderr.gets).nil?
40-
parsed_line = Hash[timestamp: Time.now, line: raw_line.to_s]
40+
parsed_line = { timestamp: Time.now, line: raw_line.to_s }
4141
warn "rubyc's ruby STDERR: #{parsed_line}"
4242
end
4343
end

0 commit comments

Comments
 (0)