Answer Posted / Pooja Gupta
"The yield statement in Ruby is used within a block (a piece of code defined between do...end). When encountered, it passes control to the block, allowing it to execute its code. The value (if any) returned by the block can then be captured and used within the method."
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers