Created
November 7, 2010 12:02
-
-
Save tadzik/666090 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 675ab134208942518240031cad38716961b6ae2a Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?Tadeusz=20So=C5=9Bnierz?= <tadzikes@gmail.com> | |
Date: Sun, 7 Nov 2010 13:01:59 +0000 | |
Subject: [PATCH] Simplified Range.pick a bit | |
--- | |
src/core/Range.pm | 5 ++--- | |
1 files changed, 2 insertions(+), 3 deletions(-) | |
diff --git a/src/core/Range.pm b/src/core/Range.pm | |
index 7817568..aca8a3a 100644 | |
--- a/src/core/Range.pm | |
+++ b/src/core/Range.pm | |
@@ -75,9 +75,8 @@ class Range is Iterable does Positional { | |
$.min before $topic || (!$.excludes_min && !($.min after $topic)); | |
} | |
- multi method pick($num = 1) { | |
- return self.roll if $num == 1; | |
- nextsame; | |
+ multi method pick(1) { | |
+ self.roll; | |
} | |
multi method pick(Whatever) { | |
-- | |
1.7.3.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment