Thairuby Thairuby wrote:
> I read from somewhere that now Ruby can't dynamically create local
> variable. Is it true or just a bug?
> Sorry with my poor english.

In Ruby 1.8, all evals under a given scope (like, at the same scoped 
level in a method) used the same shared local variable scope. That scope 
grew as needed to accommodate new variables.

In Ruby 1.9, every eval gets its own scope. This provides better 
isolation between evals, which has both positive and negative side 
effects. On the positive side, the code inside an eval can use a faster 
representation of local variables that doesn't depend on being able to 
grow. On the negative side, you can't do things like this anymore:

eval "a = 1"
eval "puts a"

- Charlie