Author: pmichaud
Date: Fri Nov 7 09:10:33 2008
New Revision: 32430
Modified:
branches/rakon/languages/perl6/src/classes/List.pir
Log:
[rakudo]: item contextualizer on a list returns an Array
Modified: branches/rakon/languages/perl6/src/classes/List.pir
==============================================================================
--- branches/rakon/languages/perl6/src/classes/List.pir (original)
+++ branches/rakon/languages/perl6/src/classes/List.pir Fri Nov 7 09:10:33 2008
@@ -30,13 +30,12 @@
.namespace ['List']
.sub '!VALUE' :method
- # promote the list to an Array
- $P0 = new 'Perl6Array'
- splice $P0, self, 0, 0
- # and return its !VALUE
+ # promote the list to an Array and return its VALUE
+ $P0 = self.'item'()
.tailcall $P0.'!VALUE'()
.end
+
=item clone() (vtable method)
Return a clone of this list. (Clones its elements also.)
@@ -125,6 +124,13 @@
=cut
+.namespace ['List']
+.sub 'item' :method
+ $P0 = new 'Perl6Array'
+ splice $P0, self, 0, 0
+ .return ($P0)
+.end
+
=item list()