On 1 May 2011 17:02, David Mr. <[email protected]> wrote: > Colin Law wrote in post #996041: >> >> So if you put a break point immediately after >> setax = setA.split(" ") >> then setax is nil, but if you then (while still broken) do >> setax=setA.split(" ") then setax gets a value. >> If so I find that most remarkable. >> >> You have not said how setax and setbx are defined. Are they db cols >> for the model in which setup_data is defined or what? >> >> Colin > > Correct. I put a break point immediately after > setax = setA.split(" ") and it is nil. > p setax > nil > > Then do > setax = setA.split(" ") and setax gets a value. > p setax > ["test", "linux"]
Very odd, even ludicrous. Could you copy and paste the relevant bit of the terminal output here? Also paste the setup_data method please. In your first version of the code it was @setax, now it is setax. Which is it? > > setax and setbx are only variables used to for searching columns in the > Search table. They are not used anywhere else. Part of the code below: So are they just local variables within that method? Can you do a global search for setax and make sure they are not defined elsewhere also. The only way I can see you getting the effect you are seeing in the debugger is if there is more than one var of that name and the debugger is showing the wrong one. You could rename it in that method to see what happens. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

