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


Hello.

There is implementation of "kv" method for rakudo.

Only languages/perl/src/classes/Hash.pir affected.

-- 
Bacek.
Index: src/classes/Hash.pir
===================================================================
--- src/classes/Hash.pir	(revision 27306)
+++ src/classes/Hash.pir	(working copy)
@@ -39,7 +39,24 @@
     .return ($S0)
 .end
 
+.sub 'kv' :method
+    .local pmc iter
+    .local pmc rv
+    iter = new 'Iterator', self
+    rv   = new 'List'
+  loop:
+    unless iter goto end
+    $S1 = shift iter
+    push rv, $S1
+    $S1 = iter[$S1]
+    push rv, $S1
+    goto loop
+  end:
+    .return (rv)
+.end
 
+
+
 .sub 'keys' :method
     .local pmc iter
     .local pmc rv

Reply via email to