# RBX Question

**URL:** <https://www.ruby-forum.com/t/rbx-question/134875>\
**Category:** IronRuby\
**Created:** [April 15, 2008, 9:22pm UTC](https://www.ruby-forum.com/t/rbx-question/134875 "2008-04-15T21:22:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksunair](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b19c9b/32.png) [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Post date:** [April 15, 2008, 9:22pm UTC](https://www.ruby-forum.com/t/rbx-question/134875/1 "2008-04-15T21:22:59Z")

</div>

I see only difference is the there is no local variable concept when run  
in interpreter mode.  
Is this correct?  
Thanks.  
Unni

What is the difference in running ruby code in interpreter mode on  
rbxand running rbx with ruby code in a file passed as a parameter?

---

<div class="post-metadata">

**Author:** ![ksunair](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b19c9b/32.png) [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Post date:** [April 15, 2008, 11:08pm UTC](https://www.ruby-forum.com/t/rbx-question/134875/2 "2008-04-15T23:08:55Z")

</div>

> Unnikrishnan N. writes:

> I see only difference is the there is no local variable concept when run in interpreter mode. Is this correct?

Yes, currently local variables don’t work in rbx when running it  
interactively. The work to fix this is being done, though John/Tomas can  
chime in here about how close they are.

> What is the difference in running ruby code in interpreter mode on rbx and running rbx with ruby code in a file passed as a parameter?

It revolves around getting ruby Binding working properly. Here’s a good  
explanation of binding:  
[http://onestepback.org/index.cgi/Tech/Ruby/RubyBindings.rdoc/style/print](http://onestepback.org/index.cgi/Tech/Ruby/RubyBindings.rdoc/style/print)

Binding lets you evaluate a block against an arbitrary scope. With a  
file, you use the same scope to execute the top-level code. However a  
console requires you to execute each line against the console’s scope.

Methods, instance variables, and globals work without binding because  
they are implicitly declared on Object in some form or another, but  
local variables are defined in the binding.

Does that help clear things up?

~Jimmy
