Vidyalelo
Ruby Programming · Q17

Blocks and Procs in Ruby

Programming · Ruby Programming · question 17

Q17

What happens if you try to yield to a block that does not exist in Ruby?

A.
An IOError is raised
B.
A SyntaxError is raised
C.
A NoMethodError is raised
Answer
D.
An ArgumentError is raised

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board