wtaysom
12/02/2022, 5:07 PMyield(10, &my_proc)
, which really doesn't work at all. So I said, "&my_proc allows you to pass my_proc as the block to a method, but yield(10, &my_proc) won't usually call my_proc. Can you define a method called silly_yield so that silly_yield(10, &my_proc) does do what think yield is doing?” Here's the reply.my_proc === 10
. I asked vaguely why ===
is defined on Proc, how would you use it? And eventually wrapped up with an example before, it seems, ChatGPT decided I had used too much of its CPU.proc(&:odd?)
instead? Let's see the example using that shorter syntax instead."