The future of Ruby

Devin M. [email protected] writes:

Christian N. wrote:

OT: I must be dumb, but if it was that easy, why did Mauricio
Fernandez need almost a page of code to produce a good instance_exec?
AFAIK, you’re not dumb. Rails just extracted the fancy logic into
Proc#bind (which doesn’t come with Ruby). And the Rails instance_exec
isn’t a good instance_exec, IIRC (and I might not).

Yeah. I was pretty sure #bind wouldn’t work in general (it’s only
defined for UnboundMethod by core).

So, the Rails instance_exec is good, but they’d “better” use mfp’s
Proc#bind.