What are blocks and procs?
Answer / 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 |
Tell me how symbol is different from variables?
Explain module mixins in Ruby?
Name different methods for io console in ruby?
Difference between nil and false in ruby?
What are advantages of using ruby?
What is the use of interpolation in ruby?
Explain retry statement in ruby.
What does mri most commonly stand for?
What are Ruby iterators?
Explain the use of retry statement in ruby?
What is the difference between throw/catch and raise/rescue?
What is retry statement in ruby?