## Ruby Standard Library Documentation

### Introduction

Welcome to the Ruby Standard Library Documentation collection, brought to you by the ruby-doc project. Whether you are browsing online or offline, we hope that your use of Ruby's standard library will become more productive as a result of this effort.

ruby-doc is a project dedicated to creating and collecting documentation on Ruby. You can find collections of articles and other resources at the website.

stdlib-doc is a RubyForge project that converts Ruby source code into this documentation you are looking at. It also tracks the status of the documentation effort; you can see some of that effort in the Status Report page.

### What You'll Find Here

Each package in the Ruby standard library (found in `lib/` directory of the Ruby source code, or `lib/ruby/1.x/` of a Ruby installation) has been run through RDoc and the results have been collected here.

ruby-doc volunteers and library authors add comments to the Ruby source code CVS, and it is those comments that RDoc captures for display in this collection. As there are many libraries and few volunteers, this is a long task. To get some idea of what we've done and what we haven't, we use the stdlib-doc project mentioned above, whereby each file has a documentation score. What you need to know is that

- bold libraries in the table of contents have a high score, and
- italic libraries have a low score.

Because the source code comments go straight into Ruby's CVS, the only way to get up-to-date documentation is to use the latest Ruby code as a source. There are two important side effects here:

- the documentation may be ahead of Ruby 1.8.0, which many users will have, and
- the documentation is certainly out of step with Ruby 1.6.x.

### Downloading and Installing

You are welcome to browse this documentation online for as long as you like, but should you wish to download a copy for yourself, you may.

When you download a tarball or zip file and unpack it, you'll see a directory `ruby-doc-stdlib-0.7.1/`, for instance. You can point your browser to `index.html` and browse away, or you can install the documentation to a central location. The advantage of installing it is that when you upgrade your offline copy, you can reinstall and you will still find the documentation in that same central place, like `/usr/local/doc/ruby/stdlib/index.html`. It's up to you.

If you do wish to install it, just follow these steps:

- change directory to `ruby-doc-stdlib-x.y.z`
- run `ruby install.rb`

It will remove any existing documentation in the target directory (RDoc cruft can accumulate over time) and copy over the latest and greatest.

In the future there may be a command that searches for updates and installs them. If anyone wants to contribute such a command, feel free.

### Credits

The documentation itself has been created by Gavin Sinclair, William Webber, Lyle Johnson, and library authors. Individual library files usually have code and documentation credits.

ruby-doc.org was created and is maintained by James Britt.

Gavin Sinclair wrote the software (`ruby stdlib-doc.rb gendoc --all`) to generate this webpage (thanks, Amrita!).

Thanks to Dave Thomas for RDoc, without which this project would be impossible, and for Programming Ruby, which provided inspiration for documentation, as well as some actual text.

### A Final Note

I've had trouble getting this set of web pages consistent across browsers, but have finally learned enough CSS to get close. For a glaring example of what is still wrong, see here.