Skip to content

Commit 987c609

Browse files
committed
Use File.binread
1 parent b5ecefb commit 987c609

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/rdoc/rdoc.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,7 @@ def remove_unparseable files
429429
files.reject do |file, *|
430430
file =~ /\.(?:class|eps|erb|scpt\.txt|svg|ttf|yml)$/i or
431431
(file =~ /tags$/i and
432-
File.open(file, 'rb') { |io|
433-
io.read(100) =~ /\A(\f\n[^,]+,\d+$|!_TAG_)/
434-
})
432+
/\A(\f\n[^,]+,\d+$|!_TAG_)/.match?(File.binread(file, 100)))
435433
end
436434
end
437435

0 commit comments

Comments
 (0)