id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	lang	patch	platform
1170	/docs/book/pir/ch04_variables.pod:  Iterator does not work as documented	jkeenan	jkeenan	"Based on ''/docs/book/pir/ch04_variables.pod'' -- or page 34 of the PIR book, I created and ran this file:
{{{
[study] 518 $ cat iter.pir
.sub main :main
    $P2 = new ""ResizablePMCArray""
    $P2[0] = 10
    $P2[1] = 20
    $P1 = iter $P2
    $P5 = shift $P1
    say $P5
.end

[study] 519 $ ./parrot iter.pir
10
}}}
Based on the same source, I then created and ran this file, but running it produced an error:
{{{
[study] 520 $ cat xiter.pir 
.sub main :main
    $P2 = new ""ResizablePMCArray""
    $P2[0] = 10
    $P2[1] = 20
    $P1 = new ""Iterator"", $P2
    $P5 = shift $P1
    say $P5
.end

[study] 521 $ ./parrot xiter.pir 
Direct creation of Iterator
current instr.: 'main' pc 11 (xiter.pir:6)
}}}
Am I doing something wrong?  Is this merely a documentation error?  Or does `new ""Iterator"", $P2` not work as documented?

Thank you very much.

kid51"	bug	closed	minor		docs	1.7.0	low	fixed				applied	
