Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubyProc vs lambda return and aritySingle-choice MCQ

A proc created with `proc { return 1 }` evaluated at the TOP LEVEL of a script is called. What happens, and why does it differ from the same proc created inside a method?

pr = proc { return 1 } pr.call puts "after"