Topic: Preserve ruby variable value
For the following code:
def mofidy list
list = sub!(/\.\w+$/, '')
list = "abc.html"
Now list value is changed. Is there anyway to store the value of list first without modifying the modify function?
temp = list
but it wont work, simply because all ruby variables are object.
Last edited by Shanison (2010-02-28 23:48:14)