diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-25 05:53:22 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-25 05:53:22 +0000 |
commit | ec6b52cad6be0ff35f1eef898f76550626548fad (patch) | |
tree | 6df226f3ca0f5a7c88a2126e79913a1455d4546d /lib | |
parent | b40579b1be300cd96a7dcc646a24b04ce3abdea3 (diff) | |
download | ruby-ec6b52cad6be0ff35f1eef898f76550626548fad.tar.gz ruby-ec6b52cad6be0ff35f1eef898f76550626548fad.tar.xz ruby-ec6b52cad6be0ff35f1eef898f76550626548fad.zip |
* lib/rdoc/parser.rb (RDoc::Parser.binary?): should read in binary mode.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rdoc/parser.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rdoc/parser.rb b/lib/rdoc/parser.rb index c37256dbd..6b1233c62 100644 --- a/lib/rdoc/parser.rb +++ b/lib/rdoc/parser.rb @@ -67,7 +67,7 @@ class RDoc::Parser # the gem). def self.binary?(file) - s = (File.read(file, File.stat(file).blksize) || "").split(//) + s = (File.read(file, File.stat(file).blksize, 0, :mode => "rb") || "").split(//) if s.size > 0 then ((s.size - s.grep(" ".."~").size) / s.size.to_f) > 0.30 |