From: Andrew Timberlake Date: 2009-01-02T21:02:42+09:00 Subject: Re: Function to flush the variable ------=_Part_219110_6859300.1230897810532 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Fri, Jan 2, 2009 at 1:49 PM, Amit Agarwal wrote: > I am trying to use following code > > Status=sheet1.getCellByPosition(5, I).Formula > ie.text_field(:name, "FieldName").value =Status > > > and it works fine, but On itetrating this piece of code for multiple I/ > Ps, variable 'name', retains its old value for some of the cases. I > identified this as a cache problem. Please suggest if there any flush > () type function or action in Ruby/watir to clear the garbage value. > > actually there is function in C, i.e. flush which clears the garbage > value. > > > Andrew Timberlake wrote: > > On Fri, Jan 2, 2009 at 1:37 PM, Amit Agarwal > > wrote: > > > >> Hi, > >> Is there any function to flush the value from a variable. I am facing > >> problem while assiging a value to Ruby variable. > >> -- > >> Posted via http://www.ruby-forum.com/. > >> > >> > > What do you mean by flush? Remove the current value? > > my_var = nil > > should do that > > -- > Posted via http://www.ruby-forum.com/. > > A 'variable' with an uppercase first letter is actually a constant in ruby and you can only assign to it once. Change 'Status' to 'status' and you should see it work -- Andrew Timberlake http://ramblingsonrails.com http://www.linkedin.com/in/andrewtimberlake "I have never let my schooling interfere with my education" - Mark Twain ------=_Part_219110_6859300.1230897810532--