Answer Posted / Bhuvnesh Kumar Sharma
Blocks in Ruby are anonymous functions that can be defined within methods or other blocks. They are delimited by curly braces or the do-end keywords. Procs (procedure objects) are a way to store blocks as objects, allowing them to be assigned to variables, passed as arguments, and invoked multiple times like methods.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers