[Wtr-general] BUG: New IE windows share session state with existingopen windows
Bret Pettichord
bret at pettichord.com
Wed Jun 7 00:10:35 EDT 2006
On 6/6/06, Lonny Eachus <lonny at titanez.net> wrote:
>
> Our group has also found that global variables can carry over between
> separate runs of the same application, probably due to server caching. If a
> global variable was set during one run of the application, and not
> explicitly set to something else on the next run, then it would (often?
> always?) retain the value from the previous run. Whether this behavior is by
> design or not is moot; it exists and it is something to watch out for.
>
Lonny, I don't mean any disrespect, but i frankly have a hard time believing
this explanation. There is no server caching of global variables.
If you type "ruby foo.rb" to run your tests and then do "ruby bar.rb" to run
more tests (or "ruby foo.rb" again) there is no way the global variables
from the first run are going to affect the global variables in a later run.
You either are talking about cross-effects between two tests executed in the
same ruby session (which is what would be expected to happen) or else some
side effects of the first test are persisting (in a cache or something) so
that they affect a later run (in which case using globals vs. locals
wouldn't make a difference).
If globals really were as unreliable as you report, then Ruby would be a
shit language and no one would use it. (Or maybe it would be a magic
language and everyone would want to use it?)
I believe that you had a problem and then got rid of the global variables
and the problem went away, but i think there must have been something else
involved besides that.
Bret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060606/5c0a20e7/attachment.html
More information about the Wtr-general
mailing list