Forum: IronRuby Modifying Global String

Posted by Chris D. (chris_d94)
on 2011-06-04 17:47
If i set a global in the engine and modify it like this in c#

 scriptEngine.Runtime.Globals.SetVariable("Name", 'none');

And then in ruby do:

Name = 'A new Name'

And then try to get the global back, it is 'none' and not 'A new Name'.
How can modify the global variable and get it back?

I tried using scope, but then i kept getting an exception about the
global being undefined, so i too questions really, how do you get
variables out of scopr in ruby script?
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.