Skip to content

Commit

Permalink
Delete buggy stat(::Integer) method (#54855)
Browse files Browse the repository at this point in the history
"Where did someone get a RawFD as an integer anyway?" -@StefanKarpinski

See also #51711

Fixes #51710
  • Loading branch information
LilithHafner authored Nov 7, 2024
1 parent 37f0220 commit 22c5bdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,4 @@ end

# BEGIN 1.12 deprecations

@deprecate stat(fd::Integer) stat(RawFD(fd))

# END 1.12 deprecations
5 changes: 5 additions & 0 deletions test/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,11 @@ end
end
end

# Issue #51710 and PR #54855
@test_throws MethodError stat(7)
@test_throws MethodError ispath(false)
@test_throws MethodError ispath(1)

# On windows the filesize of a folder is the accumulation of all the contained
# files and is thus zero in this case.
if Sys.iswindows()
Expand Down

0 comments on commit 22c5bdc

Please sign in to comment.