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
delete() on hashes #1222
Comments
From polettix@gmail.comAs of 0d4fe08d2e6f, rakudo has the following behaviour:
I expected to read "Int()" (pugs, for example, does it). Cheers, Flavio. |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S32-hash/delete.t commit 70175c0637b100a6ab84762fcbeef4f888c78c4f [t/spec] Test for RT #68482 Inline Patchdiff --git a/t/spec/S32-hash/delete.t b/t/spec/S32-hash/delete.t
index 04c6549..2273ec1 100644
--- a/t/spec/S32-hash/delete.t
+++ b/t/spec/S32-hash/delete.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 9;
+plan *;
# L<S02/Names and Variables/:delete>
@@ -45,5 +45,18 @@ ok !defined(%hash{"a"}), "deleted hash elements are really deleted";
eval_dies_ok '$a :delete', "Can't :delete a scalar";
}
+# RT #68482
+{
+ my %rt68482 = 1 => 3;
+ #?rakudo todo 'RT 68482'
+ is %rt68482.delete(1).WHAT, 3.WHAT, '.delete.WHAT is the element';
+
+ %rt68482 = 1 => 3;
+ my $rt68482 = %rt68482.delete(1);
+ #?rakudo todo 'RT 68482'
+ is $rt68482.WHAT, 3.WHAT, '.WHAT of stored .delete is the element';
+}
+
+done_testing;
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @moritzfixed in baebe1fa18aa821503c38916331c514e52e413e6 (which also added tests) |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#68482 (status was 'resolved')
Searchable as RT68482$
The text was updated successfully, but these errors were encountered: