summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorHauke D <haukex@zero-g.net>2018-12-12 22:26:26 +0100
committerTony Cook <tony@develop-help.com>2019-01-02 11:53:51 +1100
commiteb699a9c8fb7ddfcafc714f1eba1bbc395dc3675 (patch)
treeff461f512b9d45dc0ea10358dc87c7269d7a5ac3 /pp_sys.c
parentb4e880f3b5c8c8ba39c7c767167801a7caf81821 (diff)
downloadperl-eb699a9c8fb7ddfcafc714f1eba1bbc395dc3675.tar.gz
First "eof" should return true
When no file has previously been opened, "eof" should return true. This behavior was broken by 32e653230c7ccc (see also [#60978]).
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 5dc20b14f0..e28e8906f1 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2121,7 +2121,7 @@ PP(pp_eof)
}
if (!gv)
- RETPUSHNO;
+ RETPUSHYES;
if ((io = GvIO(gv)) && (mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar))) {
return tied_method1(SV_CONST(EOF), SP, MUTABLE_SV(io), mg, newSVuv(which));