Ruby Standard Library¶↑
The Ruby Standard Library is a large collection of classes and modules you can require in your code to gain additional features.
Below is an overview of the libraries and extensions, followed by a brief description of each.
Libraries¶↑
MakeMakefile: A module used to generate a Makefile for C extensionsRbConfig: Information about your Ruby configuration and buildGem: A package management framework for Ruby
Extensions¶↑
Coverage: Provides coverage measurement for RubyMonitor: Provides a reentrant mutexobjspace: Extends theObjectSpacemodule to add methods for internal statisticsPTY: Creates and manages pseudo-terminalsRipper: Provides an interface for parsing Ruby programs into S-expressionsSocket: Accesses underlying OS socket implementations
Default gems¶↑
Default gems are shipped with Ruby releases and also available as rubygems.
Default gems are not uninstallable from the Ruby installation.
Default gems can be updated using rubygems.
e.g.
gem update json
Default gems can be used with bundler environments like
unbundled_env.Default gems can be used at any version in a Gemfile.
e.g.
gem "json", ">= 2.6"
Libraries¶↑
Bundler(GitHub): Manage your Ruby application’s gem dependenciesDelegator(GitHub): Provides three abilities to delegate method calls to an objectDidYouMean(GitHub): “Did you mean?” experience in RubyEnglish(GitHub): Provides references to special global variables with less cryptic namesERB(GitHub): An easy-to-use but powerful templating system for RubyErrorHighlight(GitHub): Highlight error locations in your codeFileUtils(GitHub): Several file utility methods for copying, moving, removing, etc.Find(GitHub): This module supports top-down traversal of a set of file pathsForwardable(GitHub): Provides delegation of specified methods to a designated objectIPAddr(GitHub): Provides methods to manipulate IPv4 and IPv6 IP addressesOptionParser(GitHub): Ruby-oriented class for command-line option analysisOpen3(GitHub): Provides access to stdin, stdout, and stderr when running other programsOpenURI(GitHub): An easy-to-use wrapper forURI::HTTP,URI::HTTPS, andURI::FTPPrettyPrint(GitHub): Implements a pretty printing algorithm for readable structureSecureRandom(GitHub): Interface for a secure random number generatorShellwords(GitHub): Manipulates strings with the word parsing rules of the UNIX Bourne shellSingleton(GitHub): Implementation of theSingletonpattern for RubyTempfile(GitHub): A utility class for managing temporary filesTime(GitHub): Extends theTimeclass with methods for parsing and conversionTimeout(GitHub): Auto-terminate potentially long-running operations in RubyTmpDir (GitHub): Extends the
Dirclass to manage the OS temporary file pathTSort(GitHub): Topological sorting using Tarjan’s algorithmUN (GitHub): Utilities to replace common UNIX commands
URI(GitHub): A Ruby module providing support for Uniform Resource IdentifiersYAML(GitHub): The Ruby client library for thePsychYAMLimplementationWeakRef(GitHub): Allows a referenced object to be garbage-collected
Extensions¶↑
Date(GitHub): Represents dates, with a subclass for dates with time and timezonesDigest(GitHub): Provides a framework for message digest librariesEtc(GitHub): Provides access to information typically stored in the UNIX /etc directoryFcntl(GitHub): Loads constants defined in the OS fcntl.h C header fileIO.console(GitHub): Extensions for theIOclass, includingIO.console,IO.winsize, etc.IO#nonblock(GitHub): Enable non-blocking mode withIOclass.IO#wait(GitHub): Provides the feature for waiting untilIOis readable or writable without blocking.JSON(GitHub): Implements JavaScriptObjectNotation for RubyOpenSSL(GitHub): Provides SSL, TLS, and general-purpose cryptography for RubyPathname(GitHub): Representation of the name of a file or directory on the filesystemStringScanner(GitHub): Provides lexical scanning operations on aStringZlib(GitHub): Ruby interface for the zlib compression/decompression library
Bundled gems¶↑
Bundled gems are shipped with Ruby releases and also available as rubygems.
They are only bundled with Ruby releases.
They can be uninstalled from the Ruby installation.
They need to be declared in a Gemfile when used with bundler.
Libraries¶↑
minitest: A test library supporting TDD, BDD, mocking, and benchmarking
power_assert: Power Assert for Ruby
rake (GitHub): Ruby build program with capabilities similar to make
test-unit: A compatibility layer for MiniTest
rss: A family of libraries supporting various XML-based “feeds”
net-imap: Ruby client API for the Internet Message Access Protocol
net-pop: Ruby client library for POP3
net-smtp: Simple Mail Transfer Protocol client library for Ruby
matrix: Represents a mathematical matrix
prime: Prime numbers and factorization library
rbs: RBS is a language to describe the structure of Ruby programs
typeprof: A type analysis tool for Ruby code based on abstract interpretation
debug: Debugging functionality for Ruby
mutex_m: Mixin to extend objects to be handled like a Mutex
getoptlong: Parse command line options similar to the GNU C getopt_long()
base64: Support for encoding and decoding binary data using a Base64 representation
bigdecimal: Provides arbitrary-precision floating point decimal arithmetic
observer: Provides a mechanism for the publish/subscribe pattern in Ruby
abbrev: Calculates a set of unique abbreviations for a given set of strings
resolv-replace: Replace
SocketDNS withResolvrinda: The Linda distributed computing paradigm in Ruby
drb: Distributed object system for Ruby
nkf: Ruby extension for the Network Kanji Filter
syslog: Ruby interface for the POSIX system logging facility
csv (GitHub): Provides an interface to read and write CSV files and data
ostruct: A class to build custom data structures, similar to a
Hashbenchmark: Provides methods to measure and report the time used to execute code
logger (GitHub): Provides a simple logging utility for outputting messages
pstore: Implements a file-based persistence mechanism based on a
Hashwin32ole: Provides an interface for OLE Automation in Ruby
reline (GitHub): GNU Readline and Editline in a pure Ruby implementation
readline: Wrapper for the Readline extension and Reline
fiddle: A libffi wrapper for Ruby