Commit graph

5 commits

Author SHA1 Message Date
Stan Lo
03eb777c69 Sync RDoc 6.14.0 2025-05-22 15:04:47 -07:00
Mike Dalessio
af5c34fb0b [ruby/rdoc] Prefer String#ord to #codepoints[0]
(https://github.com/ruby/rdoc/pull/1220)

09d7f35420

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2024-12-02 22:08:03 +00:00
Mike Dalessio
83bd9191d8 [ruby/rdoc] Methods are sorted symbols-first
(https://github.com/ruby/rdoc/pull/1219)

There are three distinct ranges of symbols in ASCII:

- the range below "A", 0..64 in decimal
- the range between "Z" and "a", 91..96 in decimal
- the range above "z", 123..127 in decimal

With this change, any method starting with a character in these
"symbol ranges" will be sorted before a method starting with an alpha
ASCII character. The remaining methods, all starting with alpha or
8-bit characters, will be sorted against each other exactly as before.

Specifically this addresses the issue from #1204 which is that `#[]`
and `#^` were previously sorted _after_ the alpha methods. These
methods will now be sorted before alpha methods.

Fixes https://github.com/ruby/rdoc/pull/1204

a4f13d242b
2024-11-30 16:06:54 +00:00
Stan Lo
239d54dfbc [ruby/rdoc] Improve rubocop setup
(https://github.com/ruby/rdoc/pull/1139)

* Rename rake rubocop to rake format_generated_files

* Add rubocop rules to ensure spaces are applied consistently

* Improve rubocop related CI workflows

27932d001c
2024-07-17 20:43:08 +00:00
Stan Lo
d7af8afe1b [ruby/rdoc] Group code object files into the same directory
(https://github.com/ruby/rdoc/pull/1114)

It's hard to distinguish code object classes by their file names alone.
And given that we have 18 such classes, it'd make the codebase a lot
easier to understand if we grouped them into a single directory.

Given that these classes are all autoloaded in `lib/rdoc.rb` instead
of required individually, this change should have minimum impact on
projects using RDoc as they generally just require `rdoc`, not individual
files. An example is Rails' `sdoc`:
https://github.com/rails/sdoc/blob/main/lib/sdoc/rdoc_monkey_patches.rb

4211292ffe
2024-07-02 10:15:00 +00:00
Renamed from lib/rdoc/method_attr.rb (Browse further)