Ruby - Blocks, Procs, and Lambdas
Why might a Ruby developer choose
do..end over curly braces {} for a block, beyond style preferences?do..end over curly braces {} for a block, beyond style preferences?do..end, which can affect how expressions are parsed, especially with method chaining.do..end has lower precedence than curly braces, affecting method chaining. correctly states the precedence difference. Options A, B, and D are false because performance is similar, curly braces accept parameters, and both block types can be passed to methods.do..end has lower precedence than curly braces, affecting method chaining. -> Option C15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions