New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of Array.elems #519
Comments
From @bacekHello. Trivial patch for Array.elems attached. Quote from spectest: t/spec/S29-array/elems.rakudo (Wstat: 0 -- |
From @bacekarray_elems.patchcommit 72dd10b10602af5126441df0d266dccd353cb6c2
Author: Vasily Chekalkin <bacek@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)
|
From @pmichaudOn Mon, Dec 22, 2008 at 04:15:20AM -0800, Vasily Chekalkin wrote:
As far as I can tell, Array.elems already works in trunk without Pm |
The RT System itself - Status changed from 'new' to 'open' |
From @bacekPatrick R. Michaud via RT wrote:
This is from S29-array/elems.t #?rakudo todo 'elems on Array ref' It passed with patch, but I'm not sure that test is correct. -- |
From @pmichaudPatch rejected; this will be better fixed when we have a settings-based Thanks! Pm |
@pmichaud - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#61598 (status was 'rejected')
Searchable as RT61598$
The text was updated successfully, but these errors were encountered: