Update Ruby to 3.3

This commit is contained in:
Sebastian Serth
2023-12-25 11:01:23 +01:00
parent aa8222a9ef
commit 04863f1f25
8 changed files with 18 additions and 15 deletions

View File

@ -53,9 +53,9 @@ module ApplicationHelper
ActionController::Base.helpers.sanitize Kramdown::Document.new(markdown, input: 'GFM', hard_wrap: false).to_html.strip
end
def row(options = {}, &)
def row(options = {}, &block)
tag.div(class: 'attribute-row row') do
label_column(options[:label]) + value_column(options[:value], &)
label_column(options[:label]) + value_column(options[:value], &block)
end
end

View File

@ -169,11 +169,11 @@ class Submission < ApplicationRecord
# @raise [Runner::Error] if the code could not be run due to a failure with the runner.
# See the specific type and message for more details.
def run(file, &)
def run(file, &block)
run_command = command_for execution_environment.run_command, file.filepath
durations = {}
prepared_runner do |runner, waiting_duration|
durations[:execution_duration] = runner.attach_to_execution(run_command, &)
durations[:execution_duration] = runner.attach_to_execution(run_command, &block)
durations[:waiting_duration] = waiting_duration
rescue Runner::Error => e
e.waiting_duration = waiting_duration