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 is the difference between Procs and Blocks?



what is the difference between Procs and Blocks?..

Answer / Kalyan Kumar Yadav

Procs are objects that encapsulate a block of code, allowing it to be passed around as an object. Blocks, on the other hand, are anonymous methods defined within a method call. While blocks can be converted into Procs using the Proc#new method, not all Procs can be used as blocks.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

what is the difference between a gem and a plugin in Ruby?

1 Answers  


What is RubyGems in Ruby programming language?

1 Answers  


What are the data types in ruby?

1 Answers  


What is the use of global variable $ in Ruby?

1 Answers  


Explain about the command line options?

1 Answers  


Tell us what is class libraries in ruby?

1 Answers  


In how many ways items can be added in an array in Ruby?

1 Answers  


How is class methods defined in ruby?

1 Answers  


How symbol is different from variables?

1 Answers  


How do you handle exceptions in ruby code?

1 Answers  


What are the different uses of ruby modules?

1 Answers  


What is retry statement in ruby?

1 Answers  


Categories