Vidyalelo
Ruby Programming · Q20

Blocks and Procs in Ruby

Programming · Ruby Programming · question 20

Q20

Which method is used to check if a block has been passed to a Ruby method?

A.
block_exists?
B.
block_present?
C.
has_block?
D.
block_given?
Answer

Answer: Option D

Solution

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