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

Does hash use “ #==” or “#eql?” To compare hash keys?

1 Answers  


What are the only two values that are falsy?

1 Answers  


What is RubyGems in Ruby programming language?

1 Answers  


how many ways you can create a concatenating string?

1 Answers  


What are the different environment variables present in the ruby?

1 Answers  


Explain about portability?

1 Answers  


Tell us in ruby, it explains about the defined operator?

1 Answers  


Tell us what is class libraries in ruby?

1 Answers  


How do you remove nil values in array using ruby?

1 Answers  


what is the Notation used for denoting class variables in Ruby?

1 Answers  


Do you know how ruby looks up a method to invoke?

1 Answers  


How many iterators are there in ruby?

1 Answers  


Categories