Skip to content
Permalink
Browse files

Make sure hash slice auto-vivifies using infix metaop

Fixes R#2718
  • Loading branch information...
lizmat committed Feb 24, 2019
1 parent f98a70c commit 616b757a461faa90d889b77d53e093e70280f059
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/Rakudo/Iterator.pm6
@@ -528,7 +528,10 @@ class Rakudo::Iterator {
}
}
method AssociativeIterableKeys(\asso, \iterable) {
AssociativeIterableKeys.new(asso,iterable.iterator)
AssociativeIterableKeys.new(
nqp::if(nqp::isconcrete(asso),asso,asso = nqp::create(Hash)),
iterable.iterator
)
}

# Return an iterator that batches the given source iterator in

0 comments on commit 616b757

Please sign in to comment.
You can’t perform that action at this time.