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 |
Does hash use “ #==” or “#eql?” To compare hash keys?
What are the only two values that are falsy?
What is RubyGems in Ruby programming language?
how many ways you can create a concatenating string?
What are the different environment variables present in the ruby?
Explain about portability?
Tell us in ruby, it explains about the defined operator?
Tell us what is class libraries in ruby?
How do you remove nil values in array using ruby?
what is the Notation used for denoting class variables in Ruby?
Do you know how ruby looks up a method to invoke?
How many iterators are there in ruby?