IRB



IRB

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
ENVIRONMENT
FILES
EXAMPLES
SEE ALSO
REPORTING BUGS
AUTHORS

NAME

irb − Interactive Ruby Shell

SYNOPSIS

irb [−-version] [−dfm] [−I directory] [−r library] [−-[no]inspect] [−-[no]readline] [−-prompt mode] [−-prompt-mode mode] [−-inf-ruby-mode] [−-simple-prompt] [−-noprompt] [−-tracer] [−-back-trace-limit n] [−-irb_debug n] [−-] [program_file] [argument ...]

DESCRIPTION

irb is the REPL(read-eval-print loop) environment for Ruby programs.

OPTIONS

−-version

Prints the version of .

−E external[]:internal
−-encoding
external[]:internal

Same as ‘ruby -E’ . Specifies the default value(s) for external encodings and internal encoding. Values should be separated with colon (:).

You can omit the one for internal encodings, then the value ("Encoding.default_internal") will be nil.

−I path

Same as ‘ruby -I’ . Specifies $LOAD_PATH directory

−U

Same as ‘ruby -U’ . Sets the default value for internal encodings ("Encoding.default_internal") to UTF-8.

−d

Same as ‘ruby -d’ . Sets $DEBUG to true.

−f

Suppresses read of ~/.irbrc.

−h

−-help

Prints a summary of the options.

−m

Bc mode (load mathn, fraction or matrix are available)

−r library

Same as ‘ruby -r’. Causes irb to load the library using require.

−-inspect

Uses ‘inspect’ for output (default except for bc mode)

−-noinspect

Doesn’t use inspect for output

−-readline

Uses Readline extension module.

−-noreadline

Doesn’t use Readline extension module.

−-prompt mode
−-prompt-mode
mode

Switch prompt mode. Pre-defined prompt modes are ‘default’, ‘simple’, ‘xmp’ and ‘inf-ruby’.

−-inf-ruby-mode

Uses prompt appropriate for inf-ruby-mode on emacs. Suppresses --readline.

−-simple-prompt

Makes prompts simple.

−-noprompt

No prompt mode.

−-tracer

Displays trace for each execution of commands.

−-back-trace-limit n

Displays backtrace top n and tail n. The default value is 16.

−-irb_debug n

Sets internal debug level to n (not for popular use)

ENVIRONMENT

IRBRC

Also irb depends on same variables as ruby(1).

FILES

~/.irbrc

Personal irb initialization.

EXAMPLES

% irb
irb(main):001:0> 1 + 1
2
irb(main):002:0> def t(x)
irb(main):003:1> x+1
irb(main):004:1> end
=> nil
irb(main):005:0> tabs(1)
=> 4
irb(main):006:0> if tabs(1) == 4
irb(main):007:1> p :ok
irb(main):008:1> end
:ok
=> :ok
irb(main):009:0> quit
%

SEE ALSO

ruby(1).

REPORTING BUGS

Security vulnerabilities should be reported via an email to <security@ruby-lang.org> Reported problems will be published after being fixed.

And you can report other bugs and feature requests via the Ruby Issue Tracking System (http://bugs.ruby-lang.org). Do not report security vulnerabilities via the system because it publishes the vulnerabilities immediately.

AUTHORS

Written by Keiju ISHITSUKA.




More Linux Commands

manpages/glutSwapBuffers.3.html
glutSwapBuffers(3) - swaps the buffers of the current window
Performs a buffer swap on the layer in use for the current window. Specifically, glutSwapBuffers promotes the contents of the back buffer of the layer in use of

manpages/Tcl_Interp.3.html
Tcl_Interp(3) - client-visible fields of interpreter structu
The Tcl_CreateInterp procedure returns a pointer to a Tcl_Interp structure. This pointer is then passed into other Tcl procedures to process commands in the int

manpages/gnutls_x509_crt_get_signature_algorithm.3.html
gnutls_x509_crt_get_signature_algorithm(3) - API function...
This function will return a value of the gnutls_sign_algorithm_t enumeration that is the signature algorithm that has been used to sign this certificate. RETURN

manpages/lutimes.3.html
lutimes(3) - change file timestamps - Linux manual page.....
futimes() changes the access and modification times of a file in the same way as utimes(2), with the difference that the file whose timestamps are to be changed

manpages/Tcl_InitNotifier.3.html
Tcl_InitNotifier(3) - the event queue and notifier interface
The interfaces described here are used to customize the Tcl event loop. The two most common customizations are to add new sources of events and to merge Tcls ev

manpages/groups.1.html
groups(1) - print the groups a user is in - Linux man page
Print group memberships for each USERNAME or, if no USERNAME is specified, for the current process (which may differ if the groups database has changed). --help

manpages/ldap_perror.3.html
ldap_perror(3) - LDAP protocol error handling routines......
The ldap_err2string() routine provides short description of the various codes returned by routines in this library. The returned string is a pointer to a static

manpages/leaveok.3ncurses.html
leaveok(3ncurses) - curses output options - Linux man page
These routines set options that change the style of output within curses. All options are initially FALSE, unless otherwise stated. It is not necessary to turn

manpages/getprotobynumber_r.3.html
getprotobynumber_r(3) - get protocol entry (reentrant)......
The getprotoent_r(), getprotobyname_r(), and getprotobynumber_r() functions are the reentrant equivalents of, respectively, getprotoent(3), getprotobyname(3), a

manpages/git-bundle.1.html
git-bundle(1) - Move objects and refs by archive (Man Page)
Some workflows require that one or more branches of development on one machine be replicated on another machine, but the two machines cannot be directly connect

manpages/aria_read_log.1.html
aria_read_log(1) display Aria log file contents (Man Page)
Display and apply log records from a Aria transaction log found in the current directory (for now) Note: Aria is compiled without -DIDENTICAL_PAGES_AFTER_RECOVE

manpages/coshf.3.html
coshf(3) - hyperbolic cosine function - Linux manual page...
The cosh() function returns the hyperbolic cosine of x, which is defined mathematically as: cosh(x) = (exp(x) + exp(-x)) / 2 RETURN VALUE On success, these func





We can't live, work or learn in freedom unless the software we use is free.