-
-
Save zoffixznet/94c6f19f79372cd7bdc56d2646e374ea 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 a/src/core/Rakudo/Internals.pm b/src/core/Rakudo/Internals.pm | |
index 5e5f940..c6d83f8 100644 | |
--- a/src/core/Rakudo/Internals.pm | |
+++ b/src/core/Rakudo/Internals.pm | |
@@ -474,11 +474,23 @@ my class Rakudo::Internals { | |
} | |
method !gist(@path, @dims) { | |
if @dims.elems == 1 { | |
- '[' ~ (^@dims[0]).map({ self.AT-POS(|@path, $_).gist }).join(' ') ~ ']'; | |
+ '[' ~ (^@dims[0]).map( -> \el { | |
+ given ++$ { | |
+ when 101 { '...' } | |
+ when 102 { last } | |
+ default { self.AT-POS(|@path, el).gist } | |
+ } | |
+ }).join(' ') ~ ']'; | |
} | |
else { | |
my @nextdims = @dims[1..^@dims.elems]; | |
- '[' ~ (^@dims[0]).map({ self!gist((flat @path, $_), @nextdims) }).join(' ') ~ ']'; | |
+ '[' ~ (^@dims[0]).map( -> \el { | |
+ given ++$ { | |
+ when 101 { '...' } | |
+ when 102 { last } | |
+ default { self!gist((flat @path, el), @nextdims) } | |
+ } | |
+ }).join(' ') ~ ']'; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment