T
Tsunami Scripter
Is it possible to modify an existing ruby string without creating a new
one ?
If for example I have the following code :
x = "first string"
x = "second string"
between asigning values , the object_id() is different . Is there a
possibility to modify the first string so that after the modifications
the object_id will be the same ?
I would like to know how I could get to an empty string from "first
string". I would like to know if a clear method exists,or something
alike. I'm using ruby 1.8.7 .
one ?
If for example I have the following code :
x = "first string"
x = "second string"
between asigning values , the object_id() is different . Is there a
possibility to modify the first string so that after the modifications
the object_id will be the same ?
I would like to know how I could get to an empty string from "first
string". I would like to know if a clear method exists,or something
alike. I'm using ruby 1.8.7 .