Skip to content

Commit ccae74a

Browse files
authored
[io grant] Fix incorrect information for IO::Path.absolute
The method does not use `$*CWD`, but the object's CWD attribute, if no base is given.
1 parent d02ae7d commit ccae74a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

doc/Type/IO/Path.pod6

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,13 @@ Returns C<True> if the path is a relative path, and C<False> otherwise.
141141
142142
=head2 method absolute
143143
144-
method absolute(IO::Path:D: $base = ~$*CWD --> Str)
144+
multi method absolute(IO::Path:D: --> Str)
145+
multi method absolute(IO::Path:D: $base --> Str)
145146
146-
Returns a new C<Str> object that is an absolute path, based on C<$base>.
147+
Returns a new C<Str> object that is an absolute path. If the invocant
148+
is not already an absolute path, it is first made absolute using C<$base>
149+
as base, if it is provided, or the C<.CWD> attribute the object was
150+
created with if it is not.
147151
148152
=head2 method relative
149153

0 commit comments

Comments
 (0)