Q. Which method executes a block passed to a method in Ruby?

  • (A) yield
  • (B) execute
  • (C) run
  • (D) call
πŸ’¬ Discuss
βœ… Correct Answer: (A) yield
Explanation: The yield keyword executes the block passed to a method.
Explanation by: Rati Dubey
The yield keyword executes the block passed to a method.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
118
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
84%
Success Rate