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”)’.
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”)’.