Skip to content

Commit 2594bfc

Browse files
authored
Update section trait is rw in Routine.rakudoc (#4624)
With Rakudo Star v2025.08, the output of the code example is different than currently stated in the doc page. The apparent reason is that `say %hash.raku` now produces output in a different format. In this specific example, it's `{:some(${:key($[Any, [Any, Any, "autovivified"]])})}` Since this is rather unwieldy, I propose changing `say %hash.raku` to `say %hash`, with which the output is {some => {key => [(Any) [(Any) (Any) autovivified]]}} The same output would also be produces by `say %hash.gist`.
1 parent 64558ec commit 2594bfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/Type/Routine.rakudoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ sub walk(\thing, *@keys) is rw {
245245
my %hash;
246246
walk(%hash, 'some', 'key', 1, 2) = 'autovivified';
247247

248-
say %hash.raku;
248+
say %hash;
249249
=end code
250250

251251
produces
252252

253253
=begin code
254-
("some" => {"key" => [Any, [Any, Any, "autovivified"]]}).hash
254+
{some => {key => [(Any) [(Any) (Any) autovivified]]}}
255255
=end code
256256

257257
Note that C<return> marks return values as read only; if you need an early exit

0 commit comments

Comments
 (0)