Skip to content

Commit

Permalink
highlight why we can do result.to_hash.first
Browse files Browse the repository at this point in the history
  • Loading branch information
PragTob committed Jan 3, 2021
1 parent 19d59bb commit 168f244
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/simplecov/result_merger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def store_result(result)
synchronize_resultset do
# Ensure we have the latest, in case it was already cached
new_resultset = read_resultset
# FIXME

# A single result only ever has one command_name, see `SimpleCov::Result#to_hash`
command_name, data = result.to_hash.first
new_resultset[command_name] = data
File.open(resultset_path, "w+") do |f_|
Expand Down

0 comments on commit 168f244

Please sign in to comment.