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

A block passed to a method becomes the method's block parameter. How is its lambda-ness affected when the caller supplies a literal block versus passing an existing lambda with `&`?

def takes_block(&blk) blk.lambda? end a = takes_block { } b = takes_block(&-> { })