Skip to content
Permalink
Browse files

Fix .keys on native 1dim shaped arrays

Fixes R#2262
  • Loading branch information...
lizmat committed Sep 12, 2018
1 parent efbd58c commit 5a9105ae23aa0803ef8d8433fc750ed886c34092
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/core/Rakudo/Iterator.pm6
@@ -3350,7 +3350,11 @@ class Rakudo::Iterator {
)
}
}
method ShapeIndex(\shape) { ShapeIndex.new(shape) }
method ShapeIndex(\shape) {
shape.elems == 1
?? IntRange.new(0,shape.AT-POS(0) - 1)
!! ShapeIndex.new(shape)
}

# Returns an iterator for an unbounded sequence of generic values that
# have a .succ method to indicate the next logical value. Takes the

0 comments on commit 5a9105a

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