From: Ferdous ara Date: 2012-09-07T20:55:07+09:00 Subject: Re: cant change the string Peter Zotov wrote in post #1075034: > Ferdous ara писал 07.09.2012 14:32: >> >> DK55 >> >> but its not working > > Generally, Ruby methods tend to return a new object rather than > mutating > an existing one. Mutating methods often have a bang postfix, i.e. > "gsub!". > This is not enforced by Ruby language itself, but is a useful > convention. > > So, you need to use `host_name.gsub!("BD", "DK")'. thanks that work perfce -- Posted via http://www.ruby-forum.com/.