mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 02:48:28 +08:00
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:
@ -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!(*)
|
||||
|
Reference in New Issue
Block a user