From: Stefan Kaes Date: 2005-05-31T18:30:28+09:00 Subject: Re: creating variable with eval Robert Klemme wrote: >Stefan Kaes wrote: > > >>Robert Klemme wrote: >> >> >> >>>You cannot trust IRB on local variables. This too comes up from >>>time to time in these circumstances... :-) >>> >>> >>> >>Which means that irb has a bug that doesn't get fixed. >> >> > >No, it's not a bug. It's a conceptual thing that cannot be fixed: IRB >must process Ruby code line by line while normally all the code in a file >gets parsed and compiled into bytecode and then executed. > > Bytecode? Whishful thinking , I suppose. Anyway, entering code line by line to irb should give the same effect as running the same code from a file. I don't know any interpreted language that would give different results for the interactive shell than running the whole thing from a file. -- stefan