DEV: remove deprecated syntax

Ruby 2.7 is going to deprecate "Magic Proc Init". This feature is enormously
magical anyway and the new code is far easier to comprehend.
This commit is contained in:
Sam Saffron 2019-11-11 09:36:40 +11:00
parent 15f6f57cdc
commit b68eab2b46

View File

@ -26,8 +26,9 @@ class MiniSqlMultisiteConnection < MiniSql::Postgres::Connection
end
class AfterCommitWrapper
def initialize
@callback = Proc.new
def initialize(&blk)
raise ArgumentError, "tried to create a Proc without a block in AfterCommitWrapper" if !blk
@callback = blk
end
def committed!(*)