Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What are blocks and procs?



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

Post New Answer

More Ruby Interview Questions

Tell me how symbol is different from variables?

1 Answers  


Explain module mixins in Ruby?

1 Answers  


Name different methods for io console in ruby?

1 Answers  


Difference between nil and false in ruby?

1 Answers  


What are advantages of using ruby?

1 Answers  


What is the use of interpolation in ruby?

1 Answers  


Explain retry statement in ruby.

1 Answers  


What does mri most commonly stand for?

1 Answers  


What are Ruby iterators?

1 Answers  


Explain the use of retry statement in ruby?

1 Answers  


What is the difference between throw/catch and raise/rescue?

1 Answers  


What is retry statement in ruby?

1 Answers  


Categories