Lambda without a literal block is deprecated since Ruby 3.0, use the proc
without lambda
instead.
lambda(&proc { do_something })
lambda(&Proc.new { do_something })
proc { do_something }
Proc.new { do_something }
lambda { do_something } # If you use lambda.