On Wed 03 Apr 2002 at 20:35:30 +0900, you wrote:

> I've used eval in Ruby once: to build a Ruby browser that let us type and save
> single methods at a time, the way one does in Smalltalk. 
> 
> I believe that was a valid use. I can't think of another one. 

So what is a better way to do this?

    def each
      self.instance_variables.each { |attr| yield(eval attr) }
    end

Ian
-- 
Ian Macdonald               | Life does not begin at the moment of
ian / caliban.org             | conception or the moment of birth. It
                            | begins when the kids leave home and the dog
                            | dies. 
                            |