Skip to content

Commit ad48edc

Browse files
committed
Fix begin/rescue syntax for older rubies
1 parent 0b76afc commit ad48edc

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

test/scientist/experiment_test.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,13 @@ def @ex.raised(op, exception)
448448
Fake.raise_on_mismatches = true
449449
@ex.use { "control" }
450450
@ex.try { "candidate" }
451-
runner = -> do
452-
@ex.run
453-
rescue
454-
# StandardError handled
455-
end
451+
runner = -> {
452+
begin
453+
@ex.run
454+
rescue
455+
# StandardError handled
456+
end
457+
}
456458
assert_raises(Scientist::Experiment::MismatchError) { runner.call }
457459
end
458460

0 commit comments

Comments
 (0)