Skip to content

Commit

Permalink
Fix error for .native-descriptor on closed handle
Browse files Browse the repository at this point in the history
Addresses issue #1699.
  • Loading branch information
jnthn committed Apr 7, 2018
1 parent 1f98b1b commit 5d554ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/IO/Handle.pm6
Expand Up @@ -798,6 +798,7 @@ my class IO::Handle {
}

method native-descriptor(IO::Handle:D:) {
nqp::defined($!PIO) or die 'File handle not open, so cannot get native descriptor';
nqp::filenofh($!PIO)
}
}
Expand Down

0 comments on commit 5d554ba

Please sign in to comment.