On Thu, 10 Apr 2008 18:00:15 -0500, Ryan Lewis wrote:

> I have a User class that handles users as structs and adds them to a
> hash within the class. Anyways, I was making a Remove functions for it.
> Here's my code:
> 
> [code]
>   class User < Struct.new(:username, :password)

>     def remove()
>       self.remove() ### => Stack Level Too Deep.
>     end
>   end

The remove() method just keeps calling itself. I think you wanted
    def remove()
      self.class.remove(self.username)
    end

--Ken


-- 
Ken (Chanoch) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/