What is the correct way to define a block in Ruby?
A. block { code }
B. do code end
C. function code
D. block code
Answer: Option A
Related Questions on Basic Syntax in Ruby
What does the 'puts' method do in Ruby?
A. Prints to console
B. Converts to string
C. Finds the length
D. Reads input from user

Join The Discussion