From: Yukihiro Matsumoto Date: 2006-07-30T22:22:28+09:00 Subject: Re: Inconsistency in scoping during module_eval? Hi, In message "Re: Inconsistency in scoping during module_eval?" on Sun, 30 Jul 2006 20:39:08 +0900, "Charles O Nutter" writes: |Why does this: | |class Foo | BAZ = 1 |end | |produce a different result than this: | |class Foo |end |Foo.module_eval { | BAZ = 1 |} Constant assignments follows static scoping in 1.8. You have to use const_set method or switch to 1.9. matz.