Login
From:
Mark's Blog
(Uncensored)
subscribe
Using instance_exec to change block scope
https://without-brains.net/2021/11/03/using-instance_exec-to-change-block-scope/
links
backlinks
Tagged with:
ruby
Roast topics
Find topics
Find it!
When you create a block in Ruby and execute it later it’s context is tied to where it was defined. Take a look at this very contrived example: