S
Serdar Kýlýç
I'm going through Brian Schr=F6der's tutorial and hit a small snag. The
code is (on page 16):
print 'Array as stack: '
stack =3D 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?
code is (on page 16):
print 'Array as stack: '
stack =3D 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?