summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-25 05:53:22 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-25 05:53:22 +0000
commitec6b52cad6be0ff35f1eef898f76550626548fad (patch)
tree6df226f3ca0f5a7c88a2126e79913a1455d4546d /lib
parentb40579b1be300cd96a7dcc646a24b04ce3abdea3 (diff)
downloadruby-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.rb2
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