[Ironruby-core] setting global variables in embedded ironruby interpreter
meinrad.recheis at gmail.com
Mon Feb 9 06:12:57 EST 2009
I am very pleased that I got everything working and found iron ruby in a
quite usable state for me. Congratulations.
Question: How do you set a global variable from C#? I found a workaround via
setting a local variable scope.SetVariable("a", obj) in the scope and
assigning it to a global via engine.Execute("$a=a", scope).
The Runtime.Globals.GetVariable and SetVariable don't seem to get / set the
BTW: as for local variables: scope.GetVariableNames() does return an empty
list. Again a workaround is Execute("local_variables", scope).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironruby-core