From: William Song Date: 2010-06-08T07:16:33+09:00 Subject: Defining struct in a class How can I properly define a struct in a class? If I have class Cards Card = Struct.new(:suit, :number) @cardsOnHand=[] @cardsOnHand.push(Card.new("S","5")) end This will give me an error message saying the push is not defined for NilClass. How should I fix this? -- Posted via http://www.ruby-forum.com/.