Update Pathname#magic_number
This commit is contained in:
parent
b1f722aed7
commit
91afda651a
@ -472,9 +472,10 @@ class Pathname
|
|||||||
@magic_number ||= if directory?
|
@magic_number ||= if directory?
|
||||||
""
|
""
|
||||||
else
|
else
|
||||||
|
max_magic_number_length = 262
|
||||||
# Length of the longest regex (currently Tar).
|
# Length of the longest regex (currently Tar).
|
||||||
# The `T.let` is a workaround until we have https://github.com/sorbet/sorbet/pull/6865
|
# FIXME: The `T.let` is a workaround until we have https://github.com/sorbet/sorbet/pull/6865
|
||||||
T.let(binread(262), T.nilable(String)) || ""
|
T.let(binread(max_magic_number_length), T.nilable(String)) || ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user