See attached short patch to src/core/List.pm to fix #101858.

-'f

>From d18c6af3e8c8bd2e1dc43d132fcc2cb39fc41e6c Mon Sep 17 00:00:00 2001
From: Geoffrey Broadwell <ge...@broadwell.org>
Date: Thu, 20 Oct 2011 21:28:36 -0700
Subject: [PATCH] List.unshift(): loop while @elems is non-empty, not while first element is true; fixes #101858

---
 src/core/List.pm |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/src/core/List.pm b/src/core/List.pm
index 0fa72bd..e679717 100644
--- a/src/core/List.pm
+++ b/src/core/List.pm
@@ -194,9 +194,7 @@ my class List does Positional {
     }
 
     method unshift(*@elems) {
-        while @elems.pop -> $e {
-            nqp::unshift($!items, $e)
-        }
+        nqp::unshift($!items, @elems.pop) while @elems;
         self
     }
 
-- 
1.7.4.1

Reply via email to