diff --git a/src/core/Exception.pm b/src/core/Exception.pm index d1fdc7f62cf..18429affc0d 100644 --- a/src/core/Exception.pm +++ b/src/core/Exception.pm @@ -770,8 +770,7 @@ my class X::Undeclared::Symbols does X::Comp { 'used at line' ~ (@lu == 1 ?? ' ' !! 's ') ~ @lu.join(', ') } sub s(@s) { - # XXX GLR this dies when trying to stringify, even though @s is just the List ("sec") - #"Did you mean '{ @s.join("', '") }'?"; + "Did you mean '{ @s.join("', '") }'?"; } my $r = ""; if %.post_types { diff --git a/src/core/List.pm b/src/core/List.pm index 2f75a9b208d..2b2e0da7623 100644 --- a/src/core/List.pm +++ b/src/core/List.pm @@ -733,8 +733,10 @@ my class List does Iterable does Positional { # declared in BOOTSTRAP my int $n = nqp::elems($!reified); while $i < $n { $tmp := nqp::ifnull(nqp::atpos($!reified, $i), Any); - nqp::push_s($rsa, - nqp::unbox_s(nqp::istype($tmp, Str) && nqp::isconcrete($tmp) ?? $tmp !! $tmp.Str)); + # Not sure why this works + nqp::push_s($rsa, nqp::unbox_s(nqp::istype($tmp, Str) && nqp::isconcrete($tmp) ?? + $tmp !! + nqp::can($tmp, 'Str') ?? $tmp.Str !! nqp::box_s($tmp, Str) )); $i = $i + 1; } nqp::push_s($rsa, '...') if $infinite;