How do you define a block in Ruby?
A. By using the keyword block followed by square brackets []
B. By using the keyword block followed by parentheses ()
C. By defining a method with the keyword block
D. By enclosing code within curly braces {}
Answer: Option D
Join The Discussion