Skip to content
On this page

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class · Ruby 3.0

Object

< BasicObject include Kernel 51 instance methods 1 class methods

!

Class methods 1

Instance methods 51

Constants

ARGF is a stream designed for use in scripts that process files given as command-line arguments or passed in via STDIN.

See ARGF (the class) for more details.

ARGV contains the command line arguments used to run ruby.

A library like OptionParser can be used to process command-line arguments.

An obsolete class, use Integer

DATA is a File that contains the data section of the executed file. To create a data section use __END__:

$ cat t.rb
puts DATA.gets
__END__
hello world!

$ ruby t.rb
hello world!

ENV

ENV is a Hash-like accessor for environment variables.

See ENV (the class) for more details.

An obsolete class, use Integer

No documentation available

An alias for OptionParser.

No documentation available
No documentation available

The copyright string for ruby

The full ruby version string, like ruby -v prints

The engine or interpreter this ruby uses.

The version of the engine or interpreter this ruby uses.

The patchlevel for this ruby. If this is a development build of ruby the patchlevel will be -1

The platform for this ruby

The date this ruby was released

The GIT commit hash for this ruby.

The running version of ruby

When a Hash is assigned to SCRIPT_LINES__ the contents of files loaded after the assignment will be added as an Array of lines with the file name as the key.

Holds the original stderr

Holds the original stdin

Holds the original stdout

Raised by Timeout.timeout when the block times out.

The Binding of the top level scope

No documentation available