mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc/parser.rb (binary?): regression.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c78dbcd131
commit
10547e3c41
2 changed files with 5 additions and 1 deletions
|
@ -67,7 +67,7 @@ class RDoc::Parser
|
|||
# content that an RDoc parser shouldn't try to consume.
|
||||
|
||||
def self.binary?(file)
|
||||
s = File.read(file, File.stat(file).blksize) || ""
|
||||
s = File.read(file, File.stat(file).blksize || 1024) || ""
|
||||
|
||||
if s[0, 2] == Marshal.dump('')[0, 2] then
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue