Skip to content

Commit

Permalink
Handle EOF in Pathname#text_executable?
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Nagel <[email protected]>
  • Loading branch information
jacknagel committed Jun 4, 2012
1 parent 4ddd942 commit 71fd9b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Library/Homebrew/extend/pathname.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ def compression_type
def text_executable?
%r[#!\s*(/.+)+] === open('r') { |f| f.readline }
rescue EOFError
false
end
def incremental_hash(hasher)
Expand Down

0 comments on commit 71fd9b2

Please sign in to comment.