tho_mica_l wrote: >> You might have to use #instance_eval. > > This is about what I try to avoid. Some interpreters make variables > available via some pseudomagic dictionary/hash. Based on ruby's nature > and my previous experiences I'd assumed ruby would provide such a > solution too but couldn't find it out myself. > There is no way in either Ruby 1.8 or Ruby 1.9. The names of variables and "variable calls" are determined at parse time, both for normal scopes and for eval. eval can add new variables, but only to the eval scope, and only in 1.8 (I believe 1.9 provides a separate eval scope for each eval). Your only change of dynamically defining things that look like variables is the attr binding a few people have described. - Charlie