On 12/18/2009 2:06 PM, Roger Pack wrote:
> Anybody know why this fails?
>
> a = 32
> class A
>   def go
>    a
>   end
> end
> puts A.new.go # raises with "a not defined"

You may want to call class_eval and define_method with blocks instead.