From: Brian Caswell Date: 2006-01-31T15:17:17+09:00 Subject: Re: Array prepending nil object On Jan 31, 2006, at 12:54 AM, Serdar K�l�� wrote: > print 'Array as stack: ' > stack = Array.new() > stack.push('a') > stack.push('b') > stack.push('c') > print stack.pop until stack.empty? > > The display that I'm getting is: > Array as stack: cbanil > > So somehow nil is creeping it's way into my array but I'm not sure > how. Any ideas? You are running this inside irb. print returns nil, which you are interpreting as being part of the output. Try adding: print "\n" To the bottom of your example. Brian