-
-
Save MasterDuke17/f6f0c040ef9ef0e4220437b1097a34f4 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
diff --git src/core.c/Rakudo/QuantHash.pm6 src/core.c/Rakudo/QuantHash.pm6 | |
index ada49bd60..5d2a5a81a 100644 | |
--- src/core.c/Rakudo/QuantHash.pm6 | |
+++ src/core.c/Rakudo/QuantHash.pm6 | |
@@ -813,18 +813,12 @@ method ADD-PAIRS-TO-BAG(\elems, Mu \iterator, Mu \type) | |
$value.throw # value cannot be made Int, so throw | |
), | |
nqp::if( # not a Pair | |
- nqp::existskey( | |
- elems, | |
- ($which := $pulled.WHICH) | |
- ), | |
- nqp::stmts( | |
- ($pair := nqp::atkey(elems,$which)), | |
- nqp::bindattr( # seen before, so increment | |
- $pair, | |
- Pair, | |
- '$!value', | |
- nqp::getattr($pair,Pair,'$!value') + 1 | |
- ) | |
+ ($pair := nqp::atkey(elems,($which := $pulled.WHICH))), | |
+ nqp::bindattr( # seen before, so increment | |
+ $pair, | |
+ Pair, | |
+ '$!value', | |
+ nqp::getattr($pair,Pair,'$!value') + 1 | |
), | |
self.BIND-TO-TYPED-BAG( # new, create new Pair | |
elems, $which, $pulled, 1, type |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment