summaryrefslogtreecommitdiff
path: root/lib/rdoc
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-30 19:45:30 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-30 19:45:30 +0000
commitd074ef4d60e389348d10dd1d81e76634c17acb2d (patch)
treef11e712b6564846cfda612cba73797920a59e224 /lib/rdoc
parent16ceba03968244e64e015965c2f3ec6a8f1836fb (diff)
* string.c (tr_setup_table): fix bug in r29146.
Initialize table even if cflag is 0; tr_find see whether del is empty or not. * string.c (tr_find): nodel can't be NULL; if NULL, it means it is not specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/parser.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rdoc/parser.rb b/lib/rdoc/parser.rb
index 9cfda127d9..1e4ab7c7a4 100644
--- a/lib/rdoc/parser.rb
+++ b/lib/rdoc/parser.rb
@@ -76,9 +76,9 @@ class RDoc::Parser
elsif s.scan(/<%|%>/).length >= 4 || s.index("\x00") then
true
elsif 0.respond_to? :fdiv then
- s.count("^ -~\t\r\n").fdiv(s.size) > 0.3
+ s.count("\x00-\x7F", "^ -~\t\r\n").fdiv(s.size) > 0.3
else # HACK 1.8.6
- (s.count("^ -~\t\r\n").to_f / s.size) > 0.3
+ (s.count("\x00-\x7F", "^ -~\t\r\n").to_f / s.size) > 0.3
end
end