From: Ryan Lewis Date: 2008-04-11T08:00:15+09:00 Subject: Stack Level Too Deep? 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) class < Stack Level Too Deep. end end [/code] Alright throw this code at the bottom to test the remove functions... [code] User.new "Alpha", "Aye" User.new "Beta", "Bee" User.new "Charlie", "Sea" puts User.list, "" ### => ["Alpha", "Beta", "Charlie"] User.remove("Beta") ### Beta removed.. puts User.list ### => ["Alpha", "Charlie"] User["Alpha"].remove ### Stack level too deep >_< puts "Alpha removed..?" [/code] Now why does it come up with a SystemStackError: stack level too deep on User["Alpha"].remove? This problem has kept me up all night O_O Attachments: http://www.ruby-forum.com/attachment/1718/user.rb -- Posted via http://www.ruby-forum.com/.