> Can anyone explain why; is this a limitation of instance_eval? Is
> there a way to make the first version work without using self? Why
> would using the assignment method or accessor be strange? I don't
> necessarily want to have people access the variable directly -- most
> of the variables have special assignment methods. So ... what's up?

This is not a limitation of instance_eval(), it's just how Ruby works. Both
this example:

    Mod::Klass::new {
         accessor = true
    }

and this example:

    Mod::Klass::new {
        accessor=(true)
    }

have the same result: they both assign "true" to a local variable
"accessor". To use your attribute "writer" methods, you *must* specify the
receiver (either "self", or some other instance). I'm pretty sure there's no
way around this (otherwise it's ambiguous).

It's discussed here and there (e.g. in the "When Trouble Strikes" chapter of
"Programming Ruby"), but I bet every Ruby programmer has been gotten by this
gotcha at least once. Well, OK, maybe not Matz ;)

Hope this helps,

Lyle