Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Created May 3, 2022 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MasterDuke17/f6f0c040ef9ef0e4220437b1097a34f4 to your computer and use it in GitHub Desktop.
Save MasterDuke17/f6f0c040ef9ef0e4220437b1097a34f4 to your computer and use it in GitHub Desktop.
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