From: caof2005 Date: 2007-07-26T02:19:58+09:00 Subject: Question - Passing parameters by reference Hello Folks My question is the following: How can I pass a reference to a method as an argument, so after finishing the execution of the method the argument gets updated with a new value. ( known as "pass by reference" in other languages ). example: .... def changeValue( val, cad ) temp = 0; val = (val * 10) / cad.to_i temp = cad.to_i + 3.to_i cad = temp.to_s end .... .... val = 35; cad = "7" puts "val before calling changeValue:= " + val.to_s puts "cad before calling changeValue:=" + cad changeValue( val, cad ) puts "val before calling changeValue:= " + val.to_s #--- I pretend to print '50' puts "cad before calling changeValue:=" + cad #--- I pretend to print '10' Regards Carlos