> I didn't really have a problem in mind, but here's an easy one: Write an =
[]=3D
> method to solve the following:
>
> obj =3D YourClass.new
> obj['answer'] =3D 42
> obj.answer =A0# =3D> 42


I'm no metaprogramming wizard... I keep trying variations until it
works.  :D  This seems to work.

class YourClass
  def []=3D(f, v)
    class << self; self end.instance_eval{ attr_accessor f };
instance_eval "@#{f}=3Dv"
  end
end