Standard Library

The Ruby Standard Library is a vast collection of classes and modules that you can require in your code for additional features.

This chapter provides documentation and links to class and module references for all sub-libraries.

Some notes about this chapter’s structure:

  • Libraries are grouped into logical sections; inside each section libraries are listed alphabetically;
  • Libraries known to be of lesser usage or support are mentioned briefly in the last section;
  • Some libraries documentation is moved to the previous part of this Reference with an attached note indicating it is part of the standard library. For example, Set is documented beside Hash and Array, Pathname is documented beside File and Dir, and so on.
  • IRB (Ruby interactive console) and RDoc (Ruby documentation tool), despite being formally parts of standard library, are documented in the Developing in Ruby chapter.

Note also that Ruby comes with so-called “bundled gems”, which are formally not parts of standard library, but always installed with Ruby. Those are listed in the Bundled Gems chapter.

For installing and developing third-party libraries, see the RubyGems chapter.