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

How do the following methods differ: @my_string.strip and @my_string.strip! ?

1 Answers  


Is ruby whitespace-dependent?

1 Answers  


Are ruby strings are mutable?

1 Answers  


Write the command to get installed Ruby version in your system?

1 Answers  


Explain retry statement in ruby.

1 Answers  


What is the difference between a statement and an expression in ruby?

1 Answers  


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

1 Answers  


What is the difference between static and dynamic scaffolding?

1 Answers  


What is the difference between extend and include?

1 Answers  


Explain ruby strings.

1 Answers  


What is the use of interpolation in ruby?

1 Answers  


Tell us what is the difference between dynamic and static scaffolding?

1 Answers  


Categories