Local variables: Ruby vs. IronRuby difference?

Hello,

Ruby:

irb(main):001:0> foo = 3
=> 3
irb(main):002:0> foo
=> 3

IronRuby:

foo = 3
=> 3

foo
:0: undefined method `foo’ for main:Object (NoMethodError)

Any idea, why this error thrown by IronRuby?

  • Alex

I fixed this a couple days ago. Don’t know whether it has already been
pushed out. Jim?

Tomas

wait… wait… Does this mean… we’re getting LOCAL variables in the
ir
REPL!?!?!?

On Thu, Jan 8, 2009 at 8:28 PM, Tomas M.
<[email protected]

y.e.s.

:slight_smile:

From: [email protected]
[mailto:[email protected]] On Behalf Of Michael
Letterle
Sent: Thursday, January 08, 2009 10:26 PM
To: [email protected]
Subject: Re: [Ironruby-core] local variables: Ruby vs. IronRuby
difference?

wait… wait… Does this mean… we’re getting LOCAL variables in the
ir REPL!?!?!?
On Thu, Jan 8, 2009 at 8:28 PM, Tomas M.
<[email protected]mailto:[email protected]>
wrote:
I fixed this a couple days ago. Don’t know whether it has already been
pushed out. Jim?

Tomas

Yep. See also my blog post - http://blog.tomasm.net.

Tomas

From: [email protected]
[mailto:[email protected]] On Behalf Of Michael
Letterle
Sent: Thursday, January 08, 2009 10:26 PM
To: [email protected]
Subject: Re: [Ironruby-core] local variables: Ruby vs. IronRuby
difference?

wait… wait… Does this mean… we’re getting LOCAL variables in the
ir REPL!?!?!?
On Thu, Jan 8, 2009 at 8:28 PM, Tomas M.
<[email protected]mailto:[email protected]>
wrote:
I fixed this a couple days ago. Don’t know whether it has already been
pushed out. Jim?

Tomas

Thanks, SVN __AND__ Git revisions pushed - IronRuby - Ruby-Forum fixed it.