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

A `Proc` is created with `Proc.new` inside a method, the method returns, and the proc is invoked afterward. What happens, and what does it reveal about how proc `return` is implemented?

def make_proc Proc.new { return 1 } end p = make_proc p.call