Problem setting .NET member variables

Hello, can anyone help me with this issue? I have the following code
running in C#:

ScriptRuntime runtime = Ruby.CreateRuntime();
ScriptEngine engine = Ruby.GetEngine(runtime);
ScriptScope scope = runtime.CreateScope();
scope.SetVariable(“model”, model);
StreamReader sr = new
StreamReader(ConfigurationManager.AppSettings[“RubyFlagsPath”] +
flagName + “.rb”);
string rubyScript = sr.ReadToEnd();
engine.Execute(rubyScript, scope);

which runs this Ruby code in part:

= false
= true


The output I get is the following:


Obviously something is not quite right, the results should have been
false, true. Now, I’ve tried this with up to four borrowers and each
time the consistent pattern I’m seeing is that whatever I set the last
passed status to is set for ALL the borrowers. Somehow Ruby is setting
the passed status for all borrowers at once with each call, even though
they are in completely different objects.

I believe this was an internal object reference issue - in .NET, not in
Ruby. thanks!