Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubyblocks procs lambdas bindingSingle-choice MCQ

A block, a proc, and a lambda all capture a `Binding`. What exactly does that captured `Binding` hold a live reference to, and what is the consequence for objects in the enclosing scope?

def counter n = 0 inc = -> { n += 1 } inc end c = counter p [c.call, c.call]