public void RubyHosting_Scopes3() {
// TODO: test other backing storages (not implemented yet):
var variables = new Dictionary<string, object>();
variables["x"] = 1;
variables["y"] = 3;
var scope = Engine.CreateScope(variables);
string script = @"
def foo
x + y
end
";
Engine.Execute(script, scope);
Assert(scope.GetVariable<int>("x") == 1);
Assert(scope.GetVariable<int>("y") == 3);
var foo = scope.GetVariable<Func<int>>("foo");
Assert(foo() == 4);
}