aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-03-29 00:52:10 +0900
committergit <svn-admin@ruby-lang.org>2023-03-31 01:14:34 +0000
commitcd65e4adcab7d04b84a8cc296bca41e3a15a0a91 (patch)
tree784a05b0242cdb7c6d2ca5e2b358df60152f9ba7 /lib
parent8523892d085c1b9a17aae3bfd35923ba270aabb3 (diff)
downloadruby-cd65e4adcab7d04b84a8cc296bca41e3a15a0a91.tar.gz
[ruby/rdoc] Use `File.binread`
https://github.com/ruby/rdoc/commit/987c609df9
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc/rdoc.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb
index 2d8a9dea8c..7e17b71d6b 100644
--- a/lib/rdoc/rdoc.rb
+++ b/lib/rdoc/rdoc.rb
@@ -429,9 +429,7 @@ The internal error was:
files.reject do |file, *|
file =~ /\.(?:class|eps|erb|scpt\.txt|svg|ttf|yml)$/i or
(file =~ /tags$/i and
- File.open(file, 'rb') { |io|
- io.read(100) =~ /\A(\f\n[^,]+,\d+$|!_TAG_)/
- })
+ /\A(\f\n[^,]+,\d+$|!_TAG_)/.match?(File.binread(file, 100)))
end
end