# New Ticket Created by  Vasily Chekalkin 
# Please include the string:  [perl #61598]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61598 >


Hello.

Trivial patch for Array.elems attached.

Quote from spectest:

t/spec/S29-array/elems.rakudo                                (Wstat: 0 
Tests: 12 Failed: 0)
   TODO passed:   11


-- 
Bacek
commit 72dd10b10602af5126441df0d266dccd353cb6c2
Author: Vasily Chekalkin <ba...@bacek.com>
Date:   Mon Dec 22 22:52:32 2008 +1100

    Implement Array.elems

diff --git a/languages/perl6/src/classes/Array.pir b/languages/perl6/src/classes/Array.pir
index f855fee..6037458 100644
--- a/languages/perl6/src/classes/Array.pir
+++ b/languages/perl6/src/classes/Array.pir
@@ -14,7 +14,7 @@ src/classes/Array.pir - Perl 6 Array class and related functions
     arrayproto.'!MUTABLE'()
 
     $P0 = get_hll_namespace ['Perl6Array']
-    '!EXPORT'('delete,exists,pop,push,shift,unshift', 'from'=>$P0)
+    '!EXPORT'('delete,elems,exists,pop,push,shift,unshift', 'from'=>$P0)
 .end
 
 =head2 Methods
@@ -59,6 +59,16 @@ Remove items from an array.
     .return (result)
 .end
 
+=item elems
+
+Return the number of elements in the array.
+
+=cut
+
+.sub 'elems' :method :multi(Perl6Array)
+    $I0 = self
+    .return ($I0)
+.end
 
 =item exists(indices :slurpy)
 

Reply via email to