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 freezing string in Ruby?



What are freezing string in Ruby?..

Answer / Sumit Kumar Gautam

Freezing a string in Ruby means making it immutable, which prevents modifications to the string's contents. In Ruby 1.8.7 and earlier versions, strings were mutable by default; however, in modern versions, all strings are frozen upon creation. To freeze a string, you can use the `freeze` method or assign the string to a constant.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

Overview of ruby programming language?

1 Answers  


How would you implement hash in ruby internally?

1 Answers  


How to read a file in Ruby?

1 Answers  


Tell me can you call a private method outside a ruby class using its object?

1 Answers  


Explain each of the following operators and how and when they should be used: ==, ===, eql?, Equal?

1 Answers  


How is visibility of methods changed in ruby?

1 Answers  


What is ruby methods?

1 Answers  


What are the different environment variables present in the ruby?

1 Answers  


Explain about the command line options?

1 Answers  


List some features of ruby?

1 Answers  


Mention what is the difference between procs and blocks?

1 Answers  


What is ruby object?

1 Answers  


Categories