Is that thread-safe? I'd be worried about deleting entries from a collection I'm iterating through without knowing the implementation. -- Chuck Durfee Lead Software Architect, CentreSuite TSYS iSolutions, Golden Email cdur...@tsys.com
Ivan Porto Carrero <i...@flanders.co.nz> Sent by: ironruby-core-boun...@rubyforge.org 09/30/2009 07:56 AM Please respond to ironruby-core@rubyforge.org To ironruby-core@rubyforge.org cc Subject Re: [Ironruby-core] Clear ScriptEngine Global Variables if (Runtime.Globals.ContainsVariable(className)) Runtime.Globals.RemoveVariable(className); --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Sep 30, 2009 at 3:43 PM, Aaron Clauson <li...@ruby-forum.com> wrote: Hi, Is there anyway to clear all global variables from the IronRuby script engine? For example if I define a variable in a script and execute it: $myVar = "Hello" And then execute another script in a new scriptscope but with the same ScriptEngine instance and use: global_variables.each do |var| print("#{var} = #{eval('$' + var)}") end Then the myVar variable from the first instance will be listed. Thanks, Aaron -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ----------------------------------------- The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core