Skip to content

Commit 84ac0dc

Browse files
authored
In ValueObjAt.rakudoc, change from dd to say and fix output (#4693)
* change from dd to say, fix output * append .raku to say argument With this the output is as it needs to be to illustrate the point in question.
1 parent bbfe7cf commit 84ac0dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/Type/ValueObjAt.rakudoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ A subclass of L<C<ObjAt>|/type/ObjAt> that should be used to indicate that a cla
1010
produces objects that are value types - in other words, that are immutable after
1111
they have been initialized.
1212

13-
my %h = a => 42; # mutable Hash
14-
dd %h.WHICH; # OUTPUT: «ObjAt.new("Hash|1402...888")␤»
13+
my %h = a => 42; # mutable Hash
14+
say %h.WHICH.raku; # OUTPUT: «ObjAt.new("Hash|2972851925856")␤»
1515

16-
my $date = Date.new(2025,7,20); # immutable Date
17-
say $date.WHICH; # OUTPUT: «ValueObjAt.new("Date|60876")␤»
16+
my $date = Date.new(2025,7,20); # immutable Date
17+
say $date.WHICH.raku; # OUTPUT: «ValueObjAt.new("Date|60876")␤»
1818

1919
If you create a class that should be considered a value type, you should add
2020
a C<WHICH> method to that class that returns a C<ValueObjAt> object, for

0 commit comments

Comments
 (0)