Skip to content

Conversation

@zverok
Copy link
Contributor

@zverok zverok commented Dec 14, 2025

  • Change #inspect result throughout the docs according to 4.0 rendering
  • Add a section about nuances of inheritance and compatibility
  • Fix TOC (for some reason referred to Array's docs 🤷)
  • Adjusted documentation for #to_set, explaining the deprecation of a form with arguments;
  • A few minor tweaks of rendering/formatting;
  • exclude set/subclass_compatible.rb from documentation. The module itself never rendered, as it is private, but the file header was included in the main Set docs, which looked weird. I didn't find away to remove it with :stopdoc: comments, for some reason, so excluded it via RDoc options file.

@zverok zverok requested a review from jeremyevans December 14, 2025 20:04
@zverok zverok self-assigned this Dec 14, 2025
@zverok zverok added the Documentation Improvements to documentation. label Dec 14, 2025
Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing these issues!

* Returns self if receiver is an instance of +Set+ and no arguments or
* block are given. Otherwise, converts the set to another with
* <tt>klass.new(self, *args, &block)</tt>.
* Without arguments, returns +self+ (for duck-typing in methods that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My preference would be to change the call-seq to show no arguments, and only document the behavior with no arguments. We are removing argument handling right after the release of 4.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is better to keep the documentation aligned with the real code. Otherwise, if the user "discovers" there are other arguments, they wouldn't know whether it is something "deprecated and not recommended to use", or something "very new, nobody had time to document yet" (this happens sometimes).

And in general, it might make a bad impression of the language if the real call-sequence (however they "discovered" it) doesn't correspond to the documented one.

I believe that for now, the most clear way is to document documents as they are, but clearly state that using them is deprecated.

@zverok zverok force-pushed the adjust-set-docs branch 2 times, most recently from fea15fd to d0b460c Compare December 16, 2025 19:07
@zverok zverok merged commit ef3ac3e into ruby:master Dec 17, 2025
50 checks passed
@zverok zverok deleted the adjust-set-docs branch December 17, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements to documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants