documentation
Ruby 3.4
recent
Text and data
String Mutable sequence of bytes with an encoding. Slicing, substitution, case, and Unicode. 135 instance methods, 2 class methods JSON Parse and generate JSON. Ships as a default gem. 12 instance methods, 7 class methods Regexp Regular-expression patterns. Match data, named captures, and flags. 20 instance methods, 11 class methods Symbol Immutable, interned names. One object per spelling. 31 instance methods, 2 class methodsCollections
Array Ordered, integer-indexed collection of any objects. 111 instance methods, 3 class methods Hash Ordered key-value map with default values and compare-by-identity. 72 instance methods, 5 class methods Enumerable Mixin that gives any class witheach the full set of search, sort, and loop methods.
61 instance methods
Range
Interval from a start to an end, endless or beginless.
29 instance methods, 2 class methods
Set
Unordered collection of unique values, backed by Hash.
59 instance methods, 3 class methods
Numbers and time
Integer Arbitrary-precision whole numbers. Bit operations and iteration. 66 instance methods, 2 class methods Date Calendar dates without time. Civil, Julian, and ISO week forms. 68 instance methods, 33 class methods Time Point in time with zone. Parsing, formatting, and arithmetic. 65 instance methods, 16 class methods Float 64-bit floating-point numbers. Rounding, not-a-number, and infinity. 47 instance methods Numeric Base class of every number. Comparison, coercion, and stepping. 46 instance methodsObjects and control
Kernel Global functions every object has:puts, require, raise, loop.
81 instance methods, 2 class methods
Object
Default root. Equality, inspection, freezing, and message sending.
42 instance methods, 1 class methods
Basicnew, and allocate.
7 instance methods, 1 class methods
Module
Named collection of methods and constants. Mixins, visibility, and reflection.
78 instance methods, 5 class methods
Proc
Callable block with a binding. Lambdas, currying, and arity.
19 instance methods, 1 class methods
Struct
Generate a value class with named members in one line.
23 instance methods, 4 class methods
Input and output
Dir Directory listing and globbing. 15 instance methods, 23 class methods File Input and output on a path. Reading, writing, file status, and permissions. 10 instance methods, 63 class methods IO Byte and line streams. Files, pipes, sockets, and the console. 117 instance methods, 16 class methodsConcurrency
Thread Concurrent execution, one thread running Ruby at a time. Queues, mutexes, and thread-local values. 37 instance methods, 19 class methods
Addrinfo
The Addrinfo class maps struct addrinfo to ruby.
42 instance methods, 7 class methods
ARGF
The files named on the command line, read as one stream.
50 instance methods
ArgumentError
Raised when the arguments are wrong and there isn’t a more specific Exception class.
0 instance methods
BasicSocket
BasicSocket is the super class for all the Socket classes.
20 instance methods, 3 class methods
Benchmark
The Benchmark module provides methods to measure and report the time used to execute Ruby code.
5 instance methods, 5 class methods
BigDecimal
Arbitrary-precision decimal numbers, from the bigdecimal gem.
2 instance methods, 1 class methods
Binding
A captured execution context. Local variables, self, and eval.
8 instance methods
CGI
Since Ruby 4.0, only the escape helpers from QueueError
The exception class which will be raised when pushing into a closed Queue.
0 instance methods
Comparable
Mixin that derives the ordering operators from Extensions
Namespace for the RubyGems patches to core classes.
0 instance methods
Coverage
Coverage provides coverage measurement feature for Ruby.
0 instance methods, 10 class methods
Data
Immutable value class with named members, defined in one line.
10 instance methods, 3 class methods
DateTime
A subclass of Date that easily handles date, hour, minute, second, and offset.
22 instance methods, 17 class methods
Delegator
Base class that passes method calls on to a wrapped object. See YouMean
The DidYouMean gem adds functionality to suggest possible method/class names upon errors such as NameError and NoMethodError.
0 instance methods, 4 class methods
Digest
Framework for message digest algorithms such as SHA-256 and MD5.
0 instance methods, 2 class methods
Encoding
Character encodings and the rules for converting between them.
6 instance methods, 10 class methods
EncodingError
EncodingError is the base class for encoding errors.
0 instance methods
English
Include the English library file in a Ruby script, and you can reference the global variables such as $_ using less cryptic names, listed below.
0 instance methods
Enumerator
A class which allows both internal and external iteration.
14 instance methods, 3 class methods
ENV
The environment variables of the process, as a Hash-like object.
0 instance methods, 49 class methods
EOFError
Raised by some IO operations when reaching the end of file.
0 instance methods
ERB
ERB provides an easy to use but powerful templating system for Ruby.
10 instance methods, 2 class methods
Errno
One exception class per operating-system error code.
0 instance methods
ErrorHighlight
Points at the exact expression that failed, under the line in an error message.
0 instance methods, 4 class methods
Etc
The Etc module provides access to information typically stored in files in the /etc directory on Unix systems.
0 instance methods, 19 class methods
Exception
Root of the error hierarchy. Backtraces, causes, and messages.
13 instance methods, 4 class methods
CGI::Escape. The rest of CGI left the standard library.
8 instance methods, 4 class methods
Closed<=>.
7 instance methods
Complex
Complex numbers in rectangular or polar form.
39 instance methods, 4 class methods
Continuation
Saved point of execution from Kernel#callcc, after require "continuation".
2 instance methods
CoreSimpleDelegator and DelegateClass.
17 instance methods, 1 class methods
Did
FalseClass
The one false object.
6 instance methods
fatal
fatal is an Exception that is raised when Ruby has encountered a fatal error and must exit.
0 instance methods
Fcntl
Constants from the C header Error
Raised for an invalid Fiber operation, such as resuming a dead fiber.
0 instance methods
Fiddle
A libffi wrapper for Ruby.
1 instance methods, 12 class methods
FileTest
FileTest implements file test operations similar to those used in File::Stat.
26 instance methods
FileUtils
Namespace for file utility methods for copying, moving, removing, etc.
47 instance methods, 52 class methods
Find
The Find module supports the top-down traversal of a set of file paths.
2 instance methods, 2 class methods
FloatDomainError
Raised when attempting to convert special float values (in particular Infinity or NaN ) to numerical classes which don’t support them.
0 instance methods
Forwardable
The Forwardable module provides delegation of specified methods to a designated object, using the methods def_delegator and def_delegators.
6 instance methods
FrozenError
Raised when there is an attempt to modify a frozen object.
1 instance methods, 1 class methods
GC
Start, tune, and measure the garbage collector.
1 instance methods, 13 class methods
Gem
RubyGems is the Ruby standard for publishing and managing third party libraries.
0 instance methods, 110 class methods
IndexError
Raised when the given index is invalid.
0 instance methods
Interrupt
Raised when the interrupt signal is received, typically because the user has pressed Control-C (on most posix platforms).
0 instance methods
IOError
Raised when an IO operation fails.
0 instance methods
IPAddr
IPAddr provides a set of methods to manipulate an IP address.
52 instance methods, 3 class methods
IPSocket
IPSocket is the super class of TCPSocket and UDPSocket.
4 instance methods, 3 class methods
KeyError
Raised when the specified key is not found.
2 instance methods, 1 class methods
LoadError
Raised when a file required (a Ruby script, extension library, …) fails to load.
0 instance methods
LocalJumpError
Raised when Ruby can’t yield as requested.
2 instance methods
Logger
Class Logger provides a simple but sophisticated logging utility that you can use to create one or more event logs for your program.
32 instance methods, 1 class methods
MakeMakefile
mkmf.rb is used by Ruby C extensions to generate a Makefile which will correctly compile and link the C extension to Ruby and a third-party library.
33 instance methods, 4 class methods
Marshal
Serialize any Ruby object graph to bytes and back.
0 instance methods, 3 class methods
MatchData
MatchData encapsulates the result of matching a Regexp against string.
27 instance methods
Math
Trigonometric, logarithmic, and root functions on floats.
0 instance methods, 26 class methods
Method
A method bound to a receiver. Call it, unbind it, or read its parameters.
22 instance methods
Monitor
Use the Monitor class when you want to have a lock object for blocks with mutual exclusion.
10 instance methods
MonitorMixin
In concurrent programming, a monitor is an object or module intended to be used safely by more than one thread.
11 instance methods, 1 class methods
fcntl.h, for IO#fcntl and open(2) flags.
0 instance methods
Fiber
Cooperative coroutines. Suspend and resume by hand or with a scheduler.
12 instance methods, 11 class methods
Fiber
Benchmark::Tms
A data object, representing the times associated with a benchmark measurement.
11 instance methods, 1 class methods
CGI::Cookie
Class representing an HTTP cookie.
9 instance methods, 2 class methods
CGI::Escape
8 instance methods
CGI::HTML3
0 instance methods
CGI::HTML4
0 instance methods
CGI::HTML4Fr
0 instance methods
CGI::HTML4Tr
0 instance methods
CGI::HTML5
0 instance methods
CGI::HtmlExtension
Mixin module providing HTML generation methods.
22 instance methods
CGI::InvalidEncoding
Exception raised when there is an invalid encoding detected
0 instance methods
CGI::QueryExtension
Mixin module that provides the following:
12 instance methods
CGI::Session
This file provides the CGI::Session class, which provides session support for CGI scripts.
6 instance methods, 1 class methods
CGI::Session::FileStore
File-based session storage class.
4 instance methods, 1 class methods
CGI::Session::MemoryStore
In-memory session storage class.
4 instance methods, 1 class methods
CGI::Session::NullStore
Dummy session storage class.
4 instance methods, 1 class methods
CGI::Session::PStore
PStore-based session storage class.
4 instance methods, 1 class methods
CGI::Util
17 instance methods
CoreExtensions::TCPSocketExt
RubyGems patch that prepends a faster connect to Extensions::TCPSocketExt::Initializer
Error
Raised for an invalid date or time.
0 instance methods
DidYouMean::ClassNameChecker
Suggests similar constant names for a YouMean::ClassNameChecker::ClassName
A candidate constant name with its namespace.
1 instance methods, 1 class methods
DidYouMean::Correctable
Mixin that adds "Did you mean?" suggestions to an error message.
5 instance methods
DidYouMean::Formatter
The DidYouMean::Formatter is the basic, default formatter for the gem.
1 instance methods, 1 class methods
DidYouMean::Jaro
Jaro similarity between two strings.
1 instance methods
DidYouMean::JaroWinkler
Jaro-Winkler similarity, which favours a shared prefix.
1 instance methods
DidYouMean::KeyErrorChecker
Suggests similar keys for a YouMean::MethodNameChecker
Suggests similar method names for a YouMean::NameErrorCheckers
Picks the checker for a YouMean::NullChecker
The checker that suggests nothing.
1 instance methods, 1 class methods
TCPSocket.
0 instance methods, 1 class methods
CoreTCPSocket.new that tries each resolved address and keeps the first to connect.
0 instance methods, 1 class methods
Date::NameError.
3 instance methods, 1 class methods
DidKeyError.
3 instance methods, 1 class methods
DidNoMethodError.
3 instance methods, 1 class methods
DidNameError, by constant or by variable name.
0 instance methods, 1 class methods
Did
DidYouMean::PatternKeyNameChecker
Suggests similar keys for a YouMean::PlainFormatter
The DidYouMean::Formatter is the basic, default formatter for the gem.
1 instance methods, 1 class methods
DidYouMean::RequirePathChecker
Suggests similar paths for a failed YouMean::SpellChecker
Ranks a dictionary of words by distance to a misspelling.
1 instance methods, 1 class methods
DidYouMean::TreeSpellChecker
Spell checker for a dictionary with a tree structure, such as file paths.
13 instance methods, 1 class methods
DidYouMean::VariableNameChecker
Suggests similar variable and method names for a YouMean::VerboseFormatter
The DidYouMean::Formatter is the basic, default formatter for the gem.
1 instance methods, 1 class methods
Digest::Base
This abstract class provides a common interface to message digest implementation classes written in C.
5 instance methods
Digest::Class
Base class of the digest algorithm classes.
0 instance methods, 5 class methods
Digest::Instance
Methods every digest object has: MD5
A class for calculating message digests using the MD5 Message-Digest Algorithm by RSA Data Security, Inc., described in RFC1321.
0 instance methods
Digest::RMD160
A class for calculating message digests using RIPEMD-160 cryptographic hash function, designed by Hans Dobbertin, Antoon Bosselaers, and Bart Preneel.
0 instance methods
Digest::SHA1
SHA-1 message digests. Not safe where collisions matter.
0 instance methods
Digest::SHA2
A meta digest provider class for SHA256, SHA384 and SHA512.
5 instance methods, 1 class methods
Digest::SHA256
SHA-256 message digests, from the NIST SHA-2 family.
0 instance methods
Digest::SHA384
SHA-384 message digests, from the NIST SHA-2 family.
0 instance methods
Digest::SHA512
SHA-512 message digests, from the NIST SHA-2 family.
0 instance methods
Encoding::CompatibilityError
Raised by Encoding and String methods when the source encoding is incompatible with the target encoding.
0 instance methods
Encoding::Converter
Encoding conversion class.
14 instance methods, 3 class methods
Encoding::ConverterNotFoundError
Raised by transcoding methods when a named encoding does not correspond with a known converter.
0 instance methods
Encoding::InvalidByteSequenceError
Raised by Encoding and String methods when the string being transcoded contains a byte invalid for the either the source or target encoding.
7 instance methods
Encoding::UndefinedConversionError
Raised by Encoding and String methods when a transcoding operation fails.
5 instance methods
Enumerator::ArithmeticSequence
Enumerator::ArithmeticSequence is a subclass of Enumerator, that is a representation of sequences of numbers with common difference.
13 instance methods
Enumerator::Chain
Enumerator::Chain is a subclass of Enumerator, which represents a chain of enumerables that works as a single enumerator.
4 instance methods, 1 class methods
Enumerator::Generator
Runs the block given to Lazy
Enumerator that chains Producer
Backs Product
Enumerator::Product generates a Cartesian product of any number of enumerable objects.
4 instance methods, 1 class methods
Enumerator::Yielder
The object an DefMethod
Defines an ERB template as an instance method of a class.
1 instance methods, 1 class methods
NoMatchingPatternKeyError.
3 instance methods, 1 class methods
Didrequire.
1 instance methods, 2 class methods
DidNameError.
1 instance methods, 1 class methods
Didupdate, digest, and hexdigest.
20 instance methods
Digest::Enumerator.new and feeds its values out.
0 instance methods
Enumerator::map, select and more without doing work until you ask for values.
48 instance methods, 1 class methods
Enumerator::Enumerator.produce, which builds each value from the one before.
0 instance methods
Enumerator::Enumerator.new block receives. y << value emits a value.
1 instance methods
ERB::