diff options
author | murphy <murphy@rubychan.de> | 2005-12-10 04:20:30 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2005-12-10 04:20:30 +0000 |
commit | c1b6c6339f602b8ecf69c8cb330319d99e039063 (patch) | |
tree | 4ba62de2ff5a2ac7e0f13b5622b0044c45f684f9 /lib/coderay/encoders/statistic.rb | |
parent | 7c96846e16ae60d8797ef37d83cb6b0f0553ef2e (diff) | |
download | coderay-c1b6c6339f602b8ecf69c8cb330319d99e039063.tar.gz |
Plugin System extended:
- helper method
- path names are expanded
encoders/html.rb, div.rb, span.rb, ruby.rb:
- using new methods (fixes problems with rdoc and test tasks):
renamed scanners/ruby/helper.rb to patterns.rb
encoders/statistic.rb: sorting made deterministic (for unit testing)
Diffstat (limited to 'lib/coderay/encoders/statistic.rb')
-rw-r--r-- | lib/coderay/encoders/statistic.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/coderay/encoders/statistic.rb b/lib/coderay/encoders/statistic.rb index cd26272..b8905ff 100644 --- a/lib/coderay/encoders/statistic.rb +++ b/lib/coderay/encoders/statistic.rb @@ -64,7 +64,7 @@ Token Types (%d): @type_stats.each do |type, stat|
stat.size /= stat.count.to_f
end
- types_stats = @type_stats.sort_by { |k, v| -v.count }.map do |k, v|
+ types_stats = @type_stats.sort_by { |k, v| [-v.count, k.to_s] }.map do |k, v|
TOKEN_TYPES_ROW % [k, v.count, 100.0 * v.count / all_count, v.size]
end.join
STATS % [
|