Skip to content

Commit

Permalink
Fix return from ensure
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Sep 16, 2024
1 parent 55508a1 commit 8cfb337
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/runners/submission_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ def run
finalize
@time_messages << build_message(format('<strong>Total time:</strong> %<time>.2f seconds', time: (Time.zone.now - @start)), 'zeus', 'html')
result[:messages]&.concat @time_messages
result
# By placing the return here, we also silence the warning (ie, no exception can be caught in surrounding code)
# Instead the normal flow will be followed with the following return value
return result # rubocop:disable Lint/EnsureReturn
end

private
Expand Down

0 comments on commit 8cfb337

Please sign in to comment.