I’m going through Brian Schröder’s tutorial and hit a small snag. The
code is (on page 16):
print 'Array as stack: ’
stack = Array.new()
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?