Ray Linn wrote: > I found Ironruby 1.0 change a lot for some APIs, at previous version > > I can create a rubycommandline via C# like this > > IronRuby.Hosting.RubyCommandLine rubycommandline = new > RubyCommandLine(new > IronRuby.Runtime.RubyContext(ScriptDomainManager.CurrentManager)); > > but now the construction accept zero parameters, so How transfer a > scriptscope to RubyCommandLine..? > > I used debug to verbose the instance of RubyCommandLine, its scriptscope > is always null!
2nd question why global variable does not work? Form frm = new Form(); ScriptEngine ruby = IronRuby.Ruby.GetEngine(IronRuby.Ruby.CreateRuntime()); ruby.Runtime.Globals.SetVariable("frm", frm); ScriptScope scriptscope = ruby.Runtime.CreateScope(); ScriptSource script = this.scriptengine.CreateScriptSourceFromFile("test.rb"); scriptscope.SetVariable("frm",frm); ruby.Execute(script.GetCode(),scriptscope); ----------------------------------------------- test.rb defined? $frm ---------but it is nil.... defied? frm it is ok... -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core