develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33940 - trunk/languages/perl6/src/classes

From:
pmichaud
Date:
December 15, 2008 15:59
Subject:
[svn:parrot] r33940 - trunk/languages/perl6/src/classes
Message ID:
20081215235920.96456CBA12@x12.develooper.com
Author: pmichaud
Date: Mon Dec 15 15:59:19 2008
New Revision: 33940

Modified:
   trunk/languages/perl6/src/classes/Protoobject.pir

Log:
[rakudo]:  Make sure Protoobjects don't participate in list flattening.


Modified: trunk/languages/perl6/src/classes/Protoobject.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Protoobject.pir	(original)
+++ trunk/languages/perl6/src/classes/Protoobject.pir	Mon Dec 15 15:59:19 2008
@@ -77,6 +77,16 @@
 
 =over
 
+=item !flatten()
+
+=cut
+
+.sub '!flatten' :method
+    $P0 = new 'ResizablePMCArray'
+    push $P0, self
+    .return ($P0)
+.end
+
 =item !IMMUTABLE()
 
 =item !MUTABLE()



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About