Skip to content

Commit

Permalink
Make dd output consistent for arrays and hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jan 5, 2022
1 parent 1b5c0b9 commit 59929f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core.c/Any.pm6
Expand Up @@ -593,8 +593,9 @@ sub dd(|c) { # is implementation-detail
while $args {
my $var := nqp::shift($args);
my $name := ! nqp::istype($var.VAR, Failure) && try $var.VAR.name;
$name := '@' if $name eq 'element';
my $type := $var.WHAT.^name.split("::").tail;
$type := $type.chop if $name && $name.starts-with('@' | '%');
$type := $type.chop if $type.contains(/ \W $ /);
my $what := nqp::can($var,'raku')
?? $var.raku
!! nqp::can($var,'perl')
Expand Down

0 comments on commit 59929f0

Please sign in to comment.