From 10547e3c412be6f4f14f818294bf456dacad1ec4 Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 2 Apr 2010 03:53:01 +0000 Subject: * lib/rdoc/parser.rb (binary?): regression. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/rdoc/parser.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7f0acfcc64..91a1e9f6ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Apr 2 12:52:25 2010 NAKAMURA Usaku + + * lib/rdoc/parser.rb (binary?): regression. + Fri Apr 2 11:54:49 2010 NAKAMURA Usaku * win32/win32.c (init_env): wrong calculation of the head of setenv diff --git a/lib/rdoc/parser.rb b/lib/rdoc/parser.rb index d29599c879..9ad1fbdf66 100644 --- a/lib/rdoc/parser.rb +++ b/lib/rdoc/parser.rb @@ -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 -- cgit v1.2.3