Commit 09630a0
authored
Fix class/module alias document having wrong name (ruby#1515)
Fixes ruby#1014
Some aliased class/module document had wrong title.
Example: https://docs.ruby-lang.org/en/master/Net/HTTP.html
Title should be `class Net::HTTP`, Not `class Net::HTTPSession`.
```ruby
# Source
module Net
class HTTP
...
end
HTTPSession = HTTP
deprecate_constant :HTTPSession
end
```
RDoc first generates `Net/HTTP.html` with the correct content, and then
overwrite the same file with aliased-name content.
Fixes:
- Stop aliased class/module document file overwrite original one.
- Fix aliasing-to-toplevel check (because test failed with the above
change).
Documents of `ruby/ruby` that will change:
```
DidYouMean/Formatter.html
Title change from DidYouMean::VerboseFormatter
Net/HTTP.html
Title change from Net::HTTPSession
Net/HTTPFound.html
Title change from Net::HTTPMovedTemporarily
Net/HTTPPayloadTooLarge.html
Title change from Net::HTTPRequestEntityTooLarge
Net/HTTPRangeNotSatisfiable.html
Title change from Net::HTTPRequestedRangeNotSatisfiable
Net/HTTPRequestURITooLong.html
Title was Net::HTTPRequestURITooLarge, file deleted
OpenSSL/PKey/PKeyError.html
Title change from OpenSSL::PKey::RSAError
Prism/Translation/Parser33.html
Title change from Prism::Translation::ParserCurrent
```1 parent 890d5da commit 09630a0
File tree
4 files changed
+26
-7
lines changed- lib/rdoc
- code_object
- generator
- test/rdoc/generator
4 files changed
+26
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | | - | |
811 | | - | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
812 | 814 | | |
813 | | - | |
814 | 815 | | |
| 816 | + | |
815 | 817 | | |
816 | 818 | | |
817 | 819 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
360 | 362 | | |
361 | 363 | | |
362 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
60 | 73 | | |
61 | 74 | | |
62 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
304 | | - | |
| 306 | + | |
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
| |||
338 | 340 | | |
339 | 341 | | |
340 | 342 | | |
341 | | - | |
| 343 | + | |
342 | 344 | | |
343 | 345 | | |
344 | 346 | | |
| |||
0 commit comments