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

A Proc captures its defining scope. After this runs, what does the second call print, and what does it reveal about how the closure stores the variable?

def counter n = 10 reader = proc { n } reader.call n += 1 reader.call end puts counter