mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:52:11 +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:
parent
15f6f57cdc
commit
b68eab2b46
|
@ -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!(*)
|
||||
|
|
Loading…
Reference in New Issue
Block a user