Skip to content

Commit 6161763

Browse files
committed
Changes BUILD to TWEAK in code example
Code example now works using TWEAK instead of BUILD. Changes description to mentions TWEAK instead of BUILD too.
1 parent 11e34d0 commit 6161763

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/Language/rb-nutshell.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ class Person {
945945
Creating a new instance of the class uses the C<.new> method. In Ruby you must
946946
manually assign instance variables as needed inside C<initialize>. In Raku
947947
you get a default constructor that accepts key/value pairs of accessor
948-
attributes, and can do further setup in the C<BUILD> method. Like with Ruby,
948+
attributes, and can do further setup in the C<TWEAK> method. Like with Ruby,
949949
you can override C<new> itself for more advanced functionality, but this is
950950
rare.
951951
@@ -968,7 +968,7 @@ class Person {
968968
has $.name = 'Jill';
969969
has $.age = 42;
970970
has $!birth_year;
971-
method BUILD {
971+
method TWEAK {
972972
$!birth_year = now.Date.year - $.age;
973973
}
974974
}

0 commit comments

Comments
 (0)