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

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

From:
pmichaud
Date:
December 26, 2008 10:39
Subject:
[svn:parrot] r34393 - trunk/languages/perl6/src/classes
Message ID:
20081226183924.23ED5CBA12@x12.develooper.com
Author: pmichaud
Date: Fri Dec 26 10:39:23 2008
New Revision: 34393

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

Log:
[rakudo]:  Fix regression on Range.reverse, reported by Tene++ .


Modified: trunk/languages/perl6/src/classes/Range.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Range.pir	(original)
+++ trunk/languages/perl6/src/classes/Range.pir	Fri Dec 26 10:39:23 2008
@@ -202,6 +202,21 @@
 .end
 
 
+=item reverse()
+
+Generate the range in reverse sequence.  (This is wrong for now--
+really what should happen is that we invert .from and .to and
+switch the :by argument.)
+
+=cut
+
+.namespace ['Range']
+.sub 'reverse' :method
+    $P0 = self.'list'()
+    .tailcall $P0.'reverse'()
+.end
+
+
 =item shift()   (vtable_method)
 
 Generate the next element at the front of the Range.



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