|
1 --- ruby-1.8.7-p357.orig/lib/rdoc/code_objects.rb 2007-02-12 15:01:19.000000000 -0800 |
|
2 +++ ruby-1.8.7-p357/lib/rdoc/code_objects.rb 2012-02-09 12:51:13.913971000 -0800 |
|
3 @@ -345,6 +345,14 @@ module RDoc |
|
4 @classes.each_value {|c| yield c} |
|
5 end |
|
6 |
|
7 + # New method for Solaris, to provide a sorted array. |
|
8 + # Return array of all modules and classes, each sorted by name. |
|
9 + |
|
10 + def sorted_modules_classes |
|
11 + @modules.values.sort_by { |m| m.name } + |
|
12 + @classes.values.sort_by { |c| c.name } |
|
13 + end |
|
14 + |
|
15 def each_method |
|
16 @method_list.each {|m| yield m} |
|
17 end |
|
18 --- ruby-1.8.7-p357.orig/lib/rdoc/generators/html_generator.rb 2007-02-12 15:01:19.000000000 -0800 |
|
19 +++ ruby-1.8.7-p357/lib/rdoc/generators/html_generator.rb 2012-02-09 16:24:17.290851000 -0800 |
|
20 @@ -1256,14 +1256,26 @@ module Generators |
|
21 @files << HtmlFile.new(toplevel, @options, FILE_DIR) |
|
22 end |
|
23 |
|
24 - RDoc::TopLevel.all_classes_and_modules.each do |cls| |
|
25 + # Solaris fix: sort the top level classes and modules, |
|
26 + # to provide fixed ordering for creation of html files, |
|
27 + # since the file names are numbered sequentially. This is |
|
28 + # needed for creating a deterministic set of file names for |
|
29 + # html document files generated by ruby. |
|
30 + sorted_classes_and_modules = |
|
31 + RDoc::TopLevel.all_classes_and_modules.sort_by { |x| x.full_name } |
|
32 + |
|
33 + sorted_classes_and_modules.each do |cls| |
|
34 build_class_list(cls, @files[0], CLASS_DIR) |
|
35 end |
|
36 end |
|
37 |
|
38 def build_class_list(from, html_file, class_dir) |
|
39 @classes << HtmlClass.new(from, html_file, class_dir, @options) |
|
40 - from.each_classmodule do |mod| |
|
41 + |
|
42 + # Solaris fix: sorts modules and classes by name, to provide |
|
43 + # a fixed set of html file pathnames, which are numbered |
|
44 + # sequentially. |
|
45 + from.sorted_modules_classes.each do |mod| |
|
46 build_class_list(mod, html_file, class_dir) |
|
47 end |
|
48 end |