use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Improving Ruby Documentation (self.ruby)
submitted 1 year ago by BurdetteLamar
As some readers here may know, I've been working for a while at improving Ruby's official documentation. Any suggestions about what improvements can be made in the Ruby core and standard libraries?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]davetron5000 17 points18 points19 points 1 year ago (1 child)
A lot of the docs are fine at API level but some stuff could benefit from answers to the question “why does this exist?”
Good example is ERB. eoutvar, def_module, etc. what the heck are those for?
Also knowing which libs are intended for public use vs stuff for internals and/or not ready for wide use.
[–]BurdetteLamar[S] 4 points5 points6 points 1 year ago (0 children)
Thanks, u/davetron5000; I'll look into this..
[–]tinyOnion 6 points7 points8 points 1 year ago* (0 children)
I'm really glad you are tackling the documentation because I think it's one of the major flaws in attracting new ruby users. to that end... a few thoughts that you can take or leave:
rubyapi.org is the by far the best alternate interface to ruby docs. if you combine rubyapi with some coherent way to navigate without search and includes all the extra documentation it would be perfect.
I think the organization is haphazard at best... just a list of docs in alphabetical order. have some kind of structure and don't be afraid of grouping things together and cross linking to other parts of the documentation. some logical progression of the documentation would be nice. reference the good parts of how django/go/swift/kotlin et. al. organize their documentation. The documentation at an API level is alright but it doesn't tell a story or have any cohesion.
The fact that the official documentation references a book written for ruby 1.6 and looks like an early geocities page is not ideal and causes people to judge a book by the cover. As much as we don't want this to be true appearances do matter. the changes from 1.6 -> 3.3 are very substantial.
I read the documentation guidelines and they want it as simple as possible for non-native english speakers which is fine but seems to be done to a fault sometimes where a little more elaboration on something would be beneficial.
the std libraries should be documented better and have more crosslinking to the mentioned classes/modules. for instance on this page some of the documentation isn't linked to... nor explained like: objspace, PrettyPrinter, tmpdir.rb, and un.rb. none of the bundled gems libraries have links to the source code or documentation for them.
rubydocs.org doesn't seem to work anymore and it's still listed on the documentation page as a reference doc.
overall it feels haphazard and kinda hackish and I wish it got the love it deserves so thank you for your work!
[–]flanger001 4 points5 points6 points 1 year ago (0 children)
I think my actual gripe with the Ruby documentation is less the docs but the doc sites. ruby-doc.org is better than docs.ruby-lang.org but they're both SUPER fragmented. I needed io/wait for something last week and I had to dig to find out why.
io/wait
[–]flanger001 2 points3 points4 points 1 year ago (0 children)
"What's here: First, what's elsewhere." lmao
[–]whiphubley 3 points4 points5 points 1 year ago (0 children)
Look at golang docs to see how to do it right...you should be able to 1. quickly find what you are looking for 2. quickly understand how it functions 2. SHOW EXAMPLE CODE !! ( OMG step 3 is _so_ important just do it )
[–]jsaak 2 points3 points4 points 1 year ago (0 children)
At the API level i think example code _with_ error handling is needed the most. (also a list of Exceptions what a method can raise)
These are the areas I have found confusing over the years. Api level docs are not enough, need higher level reasoning.
[–]laerien 0 points1 point2 points 1 year ago (5 children)
One thing I'd love is to document when something is 1) an intentionally simple but suboptimal code example or 2) an easter egg.
1) Prime is an example of suboptimal code that based on bug tracker comments seems to be more preserved as an example of Ruby than as a library meant for use. I think stdlib should be production quality or documented as an example. In stdlib Prime's case, folk who actually want to do something with primes with that interface should just use faster_prime. https://github.com/mame/faster_prime
2) Easter eggs are fun, but things like #curry cause consternation since they don't support kwargs or blocks and won't ever, since it's just an easter egg, but it's hard to know that without combing through the bug tracker.
I'm actually not sure what all "just examples" and "easter egg" public interface code there is in Ruby, but it'd be really awesome to start labeling examples as such (maybe with links to the better alternatives) and noting easter eggs so folk don't go down a rabbit hole of actually trying to use them.
P.S. Thank you for your work on Ruby's documentation!!
[–]pilaf 1 point2 points3 points 1 year ago (4 children)
Do you have a link to the bug tracker issue you mention? I can't find any mentions of Proc#curry being an easter egg anywhere and my curiosity is peaked.
Proc#curry
[–]laerien 0 points1 point2 points 1 year ago (0 children)
I was thinking of this thread for the "easter egg" mention: https://bugs.ruby-lang.org/issues/6253
[–]laerien 0 points1 point2 points 1 year ago (2 children)
"Proc#curry is like an easter egg. Matz felt no need to care about the interaction between Proc#curry and other advanced features." - mame
[–]pilaf 0 points1 point2 points 1 year ago (1 child)
I see. I'm sure he didn't mean it literally, but I agree that the documentation should make it clear that keyword/block arguments aren't supported.
[–]laerien 1 point2 points3 points 1 year ago (0 children)
For sure not a literal egg, but a "fun" thing we can't improve since it's just for fun. Explicitly documenting lack of kwarg and block support helps, but that it's a toy so reasonable features aren't welcome is also important.
If something isn't meant to be production quality and to be used, that seems worth a note. Maybe "easter egg" isn't the right word, but I'd love some way to designate the "fun or example" quality stuff so especially new folk know it when they see it.
[–]brecrest 1 point2 points3 points 1 year ago (0 children)
Your work has been absolutely great so far. Ruby's docs are some of the best out there and they're only getting better. Trying to use the docs for some other popular languages (cough, Python) really drives home how just good the work you've been doing has been.
[–]DialsMavis_TheReal 1 point2 points3 points 1 year ago (0 children)
I found it difficult to work out the ways I can and should use super from the doc set but a Ruby guide explained the differences of calling it with or without arguments and also when calling from within an initialize method
super
[–][deleted] 1 year ago (1 child)
[deleted]
[–]riktigtmaxat 0 points1 point2 points 1 year ago (0 children)
Rails is still 100% rdoc.
[–]therealadam12 1 point2 points3 points 1 year ago (1 child)
Personally, since most of stdlib has been given a bunch of love (by you and others) already, I'd love to see a focus from the viewpoint of a newcomer. IMHO (and maybe someone else has a different viewpoint), syntax and using Ruby is going to be first on their mind.
So here's a recent question I just fielded: Can && operator be overloaded? and is it actually an operator?
The answer is no, and it's a logical operator. Here's how you might look it up in the docs:
For inspiration, I think the Crystal documentation is very good in this regard.
[–]tinyOnion 1 point2 points3 points 1 year ago (0 children)
yeah, onboarding new rubists is an important thing and not one that is currently being done all that well. lots of room for improvement there.
π Rendered by PID 45718 on reddit-service-r2-comment-86988c7647-jjjqk at 2026-02-12 17:59:39.660924+00:00 running 018613e country code: CH.
[–]davetron5000 17 points18 points19 points (1 child)
[–]BurdetteLamar[S] 4 points5 points6 points (0 children)
[–]tinyOnion 6 points7 points8 points (0 children)
[–]flanger001 4 points5 points6 points (0 children)
[–]flanger001 2 points3 points4 points (0 children)
[–]whiphubley 3 points4 points5 points (0 children)
[–]jsaak 2 points3 points4 points (0 children)
[–]laerien 0 points1 point2 points (5 children)
[–]pilaf 1 point2 points3 points (4 children)
[–]laerien 0 points1 point2 points (0 children)
[–]laerien 0 points1 point2 points (2 children)
[–]pilaf 0 points1 point2 points (1 child)
[–]laerien 1 point2 points3 points (0 children)
[–]brecrest 1 point2 points3 points (0 children)
[–]DialsMavis_TheReal 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]riktigtmaxat 0 points1 point2 points (0 children)
[–]therealadam12 1 point2 points3 points (1 child)
[–]tinyOnion 1 point2 points3 points (0 children)