# Passing a script context around

**URL:** <https://www.ruby-forum.com/t/passing-a-script-context-around/140447>\
**Category:** IronRuby\
**Created:** [June 14, 2008, 4:26am UTC](https://www.ruby-forum.com/t/passing-a-script-context-around/140447 "2008-06-14T04:26:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![barby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c57346/32.png) [@barby](https://www.ruby-forum.com/u/barby)\
**Post date:** [June 14, 2008, 4:26am UTC](https://www.ruby-forum.com/t/passing-a-script-context-around/140447/1 "2008-06-14T04:26:53Z")

</div>

Hi

For the dynamic script control I wrote I want to be able to share the  
runtime environment that IronRuby has got. Is that possible with the ir  
command ?

My WPF application has got a bunch of assembly references and code files  
already loaded. It also has some constants defined. Now when I use the  
dynamic script control I have to reinitialize that whole environment and  
that is quite costly. It would be nice if I would know how to share  
variables around and such.

It looks like the class that gets me the info I want is  
RubyExecutionContext  
🙂

Thanks  
Ivan
