From: "Michael W." Date: 2013-07-14T01:55:43+09:00 Subject: Re: Module Confusion Okay. Let me try and further explain. With stack.push(obj) I would understand if it said @stack.push(obj) but that actually breaks the code. In the add_to_stack method. unknown wrote in post #1115353: > Am 13.07.2013 17:48, schrieb Michael W.: >> def stack >> include Stacklike >> end >> >> s = Stack.new >> >> s.add_to_stack("item one") >> s.add_to_stack("item two") >> >> puts s.stack > > I'm confused about your confusion. > > The #stack method simply returns the @stack array (by reference), > and push modifies it... > > Regards, > Marcus -- Posted via http://www.ruby-forum.com/.