Commit b68eab2b authored by Sam Saffron's avatar Sam Saffron

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.
parent 15f6f57c
......@@ -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!(*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment