Skip to content

Commit 22c5bdc

Browse files
authored
Delete buggy stat(::Integer) method (#54855)
"Where did someone get a RawFD as an integer anyway?" -@StefanKarpinski See also #51711 Fixes #51710
1 parent 37f0220 commit 22c5bdc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

base/deprecated.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,4 @@ end
531531

532532
# BEGIN 1.12 deprecations
533533

534-
@deprecate stat(fd::Integer) stat(RawFD(fd))
535-
536534
# END 1.12 deprecations

test/file.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,11 @@ end
459459
end
460460
end
461461

462+
# Issue #51710 and PR #54855
463+
@test_throws MethodError stat(7)
464+
@test_throws MethodError ispath(false)
465+
@test_throws MethodError ispath(1)
466+
462467
# On windows the filesize of a folder is the accumulation of all the contained
463468
# files and is thus zero in this case.
464469
if Sys.iswindows()

0 commit comments

Comments
 (0)