Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.37
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby33 /
share /
ri /
system /
IRB /
Delete
Unzip
Name
Size
Permission
Date
Action
Abort
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
CallTracer
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
CantChangeBinding
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
CantReturnToNormalMode
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Canvas
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Color
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
ColorPrinter
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Command
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Context
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Debug
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
EvalHistory
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
ExtendCommand
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
ExtendCommandBundle
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
FileInputMethod
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Frame
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
HelperMethod
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
HelpersContainer
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
IllegalParameter
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
InputCompletor
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
InputMethod
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Inspector
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Irb
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
IrbAlreadyDead
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
IrbLoader
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
IrbSwitchedToCurrentThread
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
LoadAbort
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Locale
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
NestingParser
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
NoSuchJob
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Notifier
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
OutputMethod
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Pager
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
ReadlineInputMethod
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
ReidlineInputMethod
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
RelineInputMethod
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
RubyLex
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
RubyModel
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
SourceFinder
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Statement
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
StdioInputMethod
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
StdioOutputMethod
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
UndefinedPromptMode
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
UnrecognizedSwitch
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
Vec
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
WorkSpace
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
cdesc-IRB.ri
38.23
KB
-rw-r--r--
2026-04-07 17:22
easter_egg-c.ri
249
B
-rw-r--r--
2026-04-07 17:22
easter_egg_logo-c.ri
253
B
-rw-r--r--
2026-04-07 17:22
start-c.ri
354
B
-rw-r--r--
2026-04-07 17:22
Save
Rename
U:RDoc::NormalModule[iI"IRB:ET@0o:RDoc::Markup::Document:@parts[=o;;[�S:RDoc::Markup::Heading: leveli: textI"IRB;To:RDoc::Markup::Paragraph;[I"~Module IRB ("Interactive Ruby") provides a shell-like interface that supports user interaction with the Ruby interpreter.;To;;[I"�It operates as a <em>read-eval-print loop</em> ({REPL}[https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop]) that:;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o;;[I"�<b>_Reads_</b> each character as you type. You can modify the IRB context to change the way input works. See {Input}[rdoc-ref:IRB@Input].;To;;0;[o;;[I"X<b>_Evaluates_</b> the code each time it has read a syntactically complete passage.;To;;0;[o;;[I"�<b>_Prints_</b> after evaluating. You can modify the IRB context to change the way output works. See {Output}[rdoc-ref:IRB@Output].;To;;[I" Example:;To:RDoc::Markup::Verbatim;[I"$ irb ;TI"+irb(main):001> File.basename(Dir.pwd) ;TI"=> "irb" ;TI"*irb(main):002> Dir.entries('.').size ;TI"=> 25 ;TI"7irb(main):003* Dir.entries('.').select do |entry| ;TI"-irb(main):004* entry.start_with?('R') ;TI"irb(main):005> end ;TI""=> ["README.md", "Rakefile"] ;T:@format0o;;[I"cThe typed input may also include {\IRB-specific commands}[rdoc-ref:IRB@IRB-Specific+Commands].;To;;[I"RAs seen above, you can start IRB by using the shell command <code>irb</code>.;To;;[I"EYou can stop an IRB session by typing command <code>exit</code>:;To;;[I"irb(main):006> exit ;TI"$ ;T;0o;;[I"cAt that point, IRB calls any hooks found in array <code>IRB.conf[:AT_EXIT]</code>, then exits.;TS; ; i;I"Startup;To;;[I"At startup, IRB:;To; ;:NUMBER;[o;;0;[o;;[I"sInterprets (as Ruby code) the content of the {configuration file}[rdoc-ref:IRB@Configuration+File] (if given).;To;;0;[o;;[I" Constructs the initial session context from {hash IRB.conf}[rdoc-ref:IRB@Hash+IRB.conf] and from default values; the hash content may have been affected by {command-line options}[rdoc-ref:IB@Command-Line+Options], and by direct assignments in the configuration file.;To;;0;[o;;[I"7Assigns the context to variable <code>conf</code>.;To;;0;[o;;[I"BAssigns command-line arguments to variable <code>ARGV</code>.;To;;0;[o;;[I"APrints the {prompt}[rdoc-ref:IRB@Prompt+and+Return+Formats].;To;;0;[o;;[I"�Puts the content of the {initialization script}[rdoc-ref:IRB@Initialization+Script] onto the IRB shell, just as if it were user-typed commands.;TS; ; i;I"The Command Line;To;;[I"�On the command line, all options precede all arguments; the first item that is not recognized as an option is treated as an argument, as are all items that follow.;TS; ; i ;I"Command-Line Options;To;;[I"�Many command-line options affect entries in hash <code>IRB.conf</code>, which in turn affect the initial configuration of the IRB session.;To;;[I"LDetails of the options are described in the relevant subsections below.;To;;[I"�A cursory list of the IRB command-line options may be seen in the {help message}[https://raw.githubusercontent.com/ruby/irb/master/lib/irb/lc/help-message], which is also displayed if you use command-line option <code>--help</code>.;To;;[I"{If you are interested in a specific option, consult the {index}[rdoc-ref:doc/irb/indexes.md@Index+of+Command-Line+Options].;TS; ; i ;I"Command-Line Arguments;To;;[I"ICommand-line arguments are passed to IRB in array <code>ARGV</code>:;To;;[ I""$ irb --noscript Foo Bar Baz ;TI"irb(main):001> ARGV ;TI"=> ["Foo", "Bar", "Baz"] ;TI"irb(main):002> exit ;TI"$ ;T;0o;;[I"�Command-line option <code>--</code> causes everything that follows to be treated as arguments, even those that look like options:;To;;[ I"3$ irb --noscript -- --noscript -- Foo Bar Baz ;TI"irb(main):001> ARGV ;TI"2=> ["--noscript", "--", "Foo", "Bar", "Baz"] ;TI"irb(main):002> exit ;TI"$ ;T;0S; ; i;I"Configuration File;To;;[I">You can initialize IRB via a <em>configuration file</em>.;To;;[I"ZIf command-line option <code>-f</code> is given, no configuration file is looked for.;To;;[I"ROtherwise, IRB reads and interprets a configuration file if one is available.;To;;[I"_The configuration file can contain any Ruby code, and can usefully include user code that:;To; ;;;[o;;0;[o;;[I"!Can then be debugged in IRB.;To;;0;[o;;[I"Configures IRB itself.;To;;0;[o;;[I"Requires or loads files.;To;;[I"AThe path to the configuration file is the first found among:;To; ;;;[ o;;0;[o;;[I";The value of variable <code>$IRBRC</code>, if defined.;To;;0;[o;;[I"OThe value of variable <code>$XDG_CONFIG_HOME/irb/irbrc</code>, if defined.;To;;0;[o;;[I"2File <code>$HOME/.irbrc</code>, if it exists.;To;;0;[o;;[I"=File <code>$HOME/.config/irb/irbrc</code>, if it exists.;To;;0;[o;;[I"EFile <code>.irbrc</code> in the current directory, if it exists.;To;;0;[o;;[I"EFile <code>irb.rc</code> in the current directory, if it exists.;To;;0;[o;;[I"EFile <code>_irbrc</code> in the current directory, if it exists.;To;;0;[o;;[I"EFile <code>$irbrc</code> in the current directory, if it exists.;To;;[I"9If the search fails, there is no configuration file.;To;;[I"{If the search succeeds, the configuration file is read as Ruby code, and so can contain any Ruby programming you like.;To;;[I"�Method <code>conf.rc?</code> returns <code>true</code> if a configuration file was read, <code>false</code> otherwise. Hash entry <code>IRB.conf[:RC]</code> also contains that value.;TS; ; i;I"Hash <code>IRB.conf</code>;To;;[I"IThe initial entries in hash <code>IRB.conf</code> are determined by:;To; ;;;[o;;0;[o;;[I"Default values.;To;;0;[o;;[I"7Command-line options, which may override defaults.;To;;0;[o;;[I"2Direct assignments in the configuration file.;To;;[I":You can see the hash by typing <code>IRB.conf</code>.;To;;[I"VDetails of the entries' meanings are described in the relevant subsections below.;To;;[I"{If you are interested in a specific entry, consult the {index}[rdoc-ref:doc/irb/indexes.md@Index+of+IRB.conf+Entries].;TS; ; i;I"'Notes on Initialization Precedence;To; ;;;[o;;0;[o;;[I"}Any conflict between an entry in hash <code>IRB.conf</code> and a command-line option is resolved in favor of the hash entry.;To;;0;[o;;[I"�Hash <code>IRB.conf</code> affects the context only once, when the configuration file is interpreted; any subsequent changes to it do not affect the context and are therefore essentially meaningless.;TS; ; i;I"Initialization Script;To;;[I"qBy default, the first command-line argument (after any options) is the path to a Ruby initialization script.;To;;[I"yIRB reads the initialization script and puts its content onto the IRB shell, just as if it were user-typed commands.;To;;[I"�Command-line option <code>--noscript</code> causes the first command-line argument to be treated as an ordinary argument (instead of an initialization script); <code>--script</code> is the default.;TS; ; i;I" Input;To;;[I"�This section describes the features that allow you to change the way IRB input works; see also {Input and Output}[rdoc-ref:IRB@Input+and+Output].;TS; ; i;I"Input Command History;To;;[I"By default, IRB stores a history of up to 1000 input commands in a file named <code>.irb_history</code>. The history file will be in the same directory as the {configuration file}[rdoc-ref:IRB@Configuration+File] if one is found, or in <code>~/</code> otherwise.;To;;[I"oA new IRB session creates the history file if it does not exist, and appends to the file if it does exist.;To;;[I"�You can change the filepath by adding to your configuration file: <code>IRB.conf[:HISTORY_FILE] = *filepath*</code>, where _filepath_ is a string filepath.;To;;[I"�During the session, method <code>conf.history_file</code> returns the filepath, and method <code>conf.history_file = *new_filepath*</code> copies the history to the file at <em>new_filepath</em>, which becomes the history file for the session.;To;;[I"�You can change the number of commands saved by adding to your configuration file: <code>IRB.conf[:SAVE_HISTORY] = *n*</code>, wheHISTORY_FILEre _n_ is one of:;To; ;;;[o;;0;[o;;[I":Positive integer: the number of commands to be saved,;To;;0;[o;;[I"(Zero: all commands are to be saved.;To;;0;[o;;[I"4<code>nil</code>: no commands are to be saved,.;To;;[I"�During the session, you can use methods <code>conf.save_history</code> or <code>conf.save_history=</code> to retrieve or change the count.;TS; ; i;I"Command Aliases;To;;[I"5By default, IRB defines several command aliases:;To;;[I")irb(main):001> conf.command_aliases ;TI".=> {:"$"=>:show_source, :"@"=>:whereami} ;T;0o;;[I"GYou can change the initial aliases in the configuration file with:;To;;[I"FIRB.conf[:COMMAND_ALIASES] = {foo: :show_source, bar: :whereami} ;T;0o;;[I"�You can replace the current aliases at any time with configuration method <code>conf.command_aliases=</code>; Because <code>conf.command_aliases</code> is a hash, you can modify it.;TS; ; i;I"End-of-File;To;;[I"�By default, <code>IRB.conf[:IGNORE_EOF]</code> is <code>false</code>, which means that typing the end-of-file character <code>Ctrl-D</code> causes the session to exit.;To;;[I"qYou can reverse that behavior by adding <code>IRB.conf[:IGNORE_EOF] = true</code> to the configuration file.;To;;[I"�During the session, method <code>conf.ignore_eof?</code> returns the setting, and method <code>conf.ignore_eof = *boolean*</code> sets it.;TS; ; i;I"SIGINT;To;;[I"�By default, <code>IRB.conf[:IGNORE_SIGINT]</code> is <code>true</code>, which means that typing the interrupt character <code>Ctrl-C</code> causes the session to exit.;To;;[I"uYou can reverse that behavior by adding <code>IRB.conf[:IGNORE_SIGING] = false</code> to the configuration file.;To;;[I"�During the session, method <code>conf.ignore_siging?</code> returns the setting, and method <code>conf.ignore_sigint = *boolean*</code> sets it.;TS; ; i;I"Automatic Completion;To;;[I"~By default, IRB enables [automatic completion](https://en.wikipedia.org/wiki/Autocomplete#In_command-line_interpr eters):;To;;[I"+You can disable it by either of these:;To; ;;;[o;;0;[o;;[I"WAdding <code>IRB.conf[:USE_AUTOCOMPLETE] = false</code> to the configuration file.;To;;0;[o;;[I"kGiving command-line option <code>--noautocomplete</code> (<code>--autocomplete</code> is the default).;To;;[I"�Method <code>conf.use_autocomplete?</code> returns <code>true</code> if automatic completion is enabled, <code>false</code> otherwise.;To;;[I"7The setting may not be changed during the session.;TS; ; i;I"Automatic Indentation;To;;[I"uBy default, IRB automatically indents lines of code to show structure (e.g., it indent the contents of a block).;To;;[I"dThe current setting is returned by the configuration method <code>conf.auto_indent_mode</code>.;To;;[I"6The default initial setting is <code>true</code>:;To;;[I"*irb(main):001> conf.auto_indent_mode ;TI" => true ;TI"7irb(main):002* Dir.entries('.').select do |entry| ;TI"-irb(main):003* entry.start_with?('R') ;TI"irb(main):004> end ;TI""=> ["README.md", "Rakefile"] ;T;0o;;[I"GYou can change the initial setting in the configuration file with:;To;;[I"$IRB.conf[:AUTO_INDENT] = false ;T;0o;;[I"TNote that the _current_ setting <em>may not</em> be changed in the IRB session.;TS; ; i;I"Input Method;To;;[I"�The IRB input method determines how command input is to be read; by default, the input method for a session is IRB::RelineInputMethod. Unless the value of the TERM environment variable is 'dumb', in which case the most simplistic input method is used.;To;;[I"%You can set the input method by:;To; ;;;[o;;0;[o;;[I"&Adding to the configuration file:;Fo; ;;;[o;;0;[o;;[I"�<code>IRB.conf[:USE_SINGLELINE] = true</code> or <code>IRB.conf[:USE_MULTILINE]= false</code> sets the input method to IRB::ReadlineInputMethod.;To;;0;[o;;[I"�<code>IRB.conf[:USE_SINGLELINE] = false</code> or <code>IRB.conf[:USE_MULTILINE] = true</code> sets the input method to IRB::RelineInputMethod.;To;;0;[o;;[I"!Giving command-line options:;Fo; ;;;[o;;0;[o;;[I"o<code>--singleline</code> or <code>--nomultiline</code> sets the input method to IRB::ReadlineInputMethod.;To;;0;[o;;[I"m<code>--nosingleline</code> or <code>--multiline</code> sets the input method to IRB::RelineInputMethod.;To;;0;[o;;[I"r<code>--nosingleline</code> together with <code>--nomultiline</code> sets the input to IRB::StdioInputMethod.;To;;[I"aMethod <code>conf.use_multiline?</code> and its synonym <code>conf.use_reline</code> return:;To; ;;;[o;;0;[o;;[I"D<code>true</code> if option <code>--multiline</code> was given.;To;;0;[o;;[I"G<code>false</code> if option <code>--nomultiline</code> was given.;To;;0;[o;;[I"+<code>nil</code> if neither was given.;To;;[I"dMethod <code>conf.use_singleline?</code> and its synonym <code>conf.use_readline</code> return:;To; ;;;[o;;0;[o;;[I"E<code>true</code> if option <code>--singleline</code> was given.;To;;0;[o;;[I"H<code>false</code> if option <code>--nosingleline</code> was given.;To;;0;[o;;[I"+<code>nil</code> if neither was given.;TS; ; i;I"Output;To;;[I"�This section describes the features that allow you to change the way IRB output works; see also {Input and Output}[rdoc-ref:IRB@Input+and+Output].;TS; ; i;I"$Return-Value Printing (Echoing);To;;[I"OBy default, IRB prints (echoes) the values returned by all input commands.;To;;[I"EYou can change the initial behavior and suppress all echoing by:;To; ;;;[o;;0;[o;;[I"�Adding to the configuration file: <code>IRB.conf[:ECHO] = false</code>. (The default value for this entry is <code>nil</code>, which means the same as <code>true</code>.);To;;0;[o;;[I"\Giving command-line option <code>--noecho</code>. (The default is <code>--echo</code>.);To;;[I"�During the session, you can change the current setting with configuration method <code>conf.echo=</code> (set to <code>true</code> or <code>false</code>).;To;;[I"�As stated above, by default IRB prints the values returned by all input commands; but IRB offers special treatment for values returned by assignment statements, which may be:;To; ;;;[o;;0;[o;;[I"�Printed with truncation (to fit on a single line of output), which is the default; an ellipsis (<code>...</code> is suffixed, to indicate the truncation):;Fo;;[I"$irb(main):001> x = 'abc' * 100 ;F;0o:RDoc::Markup::BlockQuote;[o;;[I"T"abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc...;To; ;;;[o;;0;[o;;[I"0Printed in full (regardless of the length).;To;;0;[o;;[I"$Suppressed (not printed at all);To;;[I",You can change the initial behavior by:;To; ;;;[o;;0;[o;;[I"�Adding to the configuration file: <code>IRB.conf[:ECHO_ON_ASSIGNMENT] = false</code>. (The default value for this entry is <code>niL</code>, which means the same as <code>:truncate</code>.);To;;0;[o;;[I"�Giving command-line option <code>--noecho-on-assignment</code> or <code>--echo-on-assignment</code>. (The default is <code>--truncate-echo-on-assignment</code>.);To;;[I"�During the session, you can change the current setting with configuration method <code>conf.echo_on_assignment=</code> (set to <code>true</code>, <code>false</code>, or <code>:truncate</code>).;To;;[I"TBy default, IRB formats returned values by calling method <code>inspect</code>.;To;;[I",You can change the initial behavior by:;To; ;;;[o;;0;[o;;[I"�Adding to the configuration file: <code>IRB.conf[:INSPECT_MODE] = false</code>. (The default value for this entry is <code>true</code>.);To;;0;[o;;[I"bGiving command-line option <code>--noinspect</code>. (The default is <code>--inspect</code>.);To;;[I"aDuring the session, you can change the setting using method <code>conf.inspect_mode=</code>.;TS; ; i;I"Multiline Output;To;;[I"@By default, IRB prefixes a newline to a multiline response.;To;;[I"RYou can change the initial default value by adding to the configuration file:;To;;[I"8IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT] = false ;T;0o;;[I"�During a session, you can retrieve or set the value using methods <code>conf.newline_before_multiline_output?</code> and <code>conf.newline_before_multiline_output=</code>.;To;;[I"Examples:;To;;[I".irb(main):001> conf.inspect_mode = false ;TI"=> false ;TI"irb(main):002> "foo\nbar" ;TI"=> ;TI" foo ;TI" bar ;TI"Airb(main):003> conf.newline_before_multiline_output = false ;TI"=> false ;TI"irb(main):004> "foo\nbar" ;TI"=> foo ;TI" bar ;T;0S; ; i;I"Evaluation History;To;;[I"�By default, IRB saves no history of evaluations (returned values), and the related methods <code>conf.eval_history</code>, <code>_</code>, and <code>__</code> are undefined.;To;;[I"ZYou can turn on that history, and set the maximum number of evaluations to be stored:;To; ;;;[o;;0;[o;;[I"�In the configuration file: add <code>IRB.conf[:EVAL_HISTORY] = *n*</code>. (Examples below assume that we've added <code>IRB.conf[:EVAL_HISTORY] = 5</code>.);To;;0;[o;;[I"HIn the session (at any time): <code>conf.eval_history = *n*</code>.;To;;[I"AIf <code>n</code> is zero, all evaluation history is stored.;To;;[I"Doing either of the above:;To; ;;;[o;;0;[o;;[I"�Sets the maximum size of the evaluation history; defines method <code>conf.eval_history</code>, which returns the maximum size <code>n</code> of the evaluation history:;Fo;;[ I"*irb(main):001> conf.eval_history = 5 ;FI" => 5 ;FI"&irb(main):002> conf.eval_history ;FI" => 5 ;F;0o;;0;[o;;[I"�Defines variable <code>_</code>, which contains the most recent evaluation, or <code>nil</code> if none; same as method <code>conf.last_value</code>:;Fo;;[I"irb(main):003> _ ;FI" => 5 ;FI"irb(main):004> :foo ;FI" => :foo ;FI"irb(main):005> :bar ;FI" => :bar ;FI"irb(main):006> _ ;FI" => :bar ;FI"irb(main):007> _ ;FI" => :bar ;F;0o;;0;[o;;[I"&Defines variable <code>__</code>:;Fo; ;;;[o;;0;[o;;[I"@<code>__</code> unadorned: contains all evaluation history:;To;;[I"irb(main):008> :foo ;FI" => :foo ;FI"irb(main):009> :bar ;FI" => :bar ;FI"irb(main):010> :baz ;FI" => :baz ;FI"irb(main):011> :bat ;FI" => :bat ;FI"irb(main):012> :bam ;FI" => :bam ;FI"irb(main):013> __ ;FI"=> ;FI"9 :bar ;FI" 10 :baz ;FI" 11 :bat ;FI" 12 :bam ;FI"irb(main):014> __ ;FI"=> ;FI" 10 :baz ;FI" 11 :bat ;FI" 12 :bam ;FI"13 ...self-history... ;F;0o;;[I"MNote that when the evaluation is multiline, it is displayed differently.;Fo;;0;[o;;[I"'<code>__[</code>_m_<code>]</code>:;To; ;;;[o;;0;[o;;[I"�Positive _m_: contains the evaluation for the given line number, or <code>nil</code> if that line number is not in the evaluation history:;Fo;;[ I"irb(main):015> __[12] ;FI" => :bam ;FI"irb(main):016> __[1] ;FI"=> nil ;F;0o;;0;[o;;[I"�Negative _m_: contains the <code>mth</code>-from-end evaluation, or <code>nil</code> if that evaluation is not in the evaluation history:;Fo;;[ I"irb(main):017> __[-3] ;FI" => :bam ;FI"irb(main):018> __[-13] ;FI"=> nil ;F;0o;;0;[o;;[I")Zero _m_: contains <code>nil</code>:;Fo;;[I"irb(main):019> __[0] ;FI"=> nil ;F;0S; ; i;I"Prompt and Return Formats;To;;[I"oBy default, IRB uses the prompt and return value formats defined in its <code>:DEFAULT</code> prompt mode.;TS; ; i ;I")The Default Prompt and Return Format;To;;[I"9The default prompt and return values look like this:;To;;[ I"irb(main):001> 1 + 1 ;TI" => 2 ;TI"irb(main):002> 2 + 2 ;TI" => 4 ;T;0o;;[I"The prompt includes:;To; ;;;[o;;0;[o;;[I"_The name of the running program (<code>irb</code>); see {IRB Name}[rdoc-ref:IRB@IRB+Name].;To;;0;[o;;[I"hThe name of the current session (<code>main</code>); See {IRB Sessions}[rdoc-ref:IRB@IRB+Sessions].;To;;0;[o;;[I"%A 3-digit line number (1-based).;To;;[I"7The default prompt actually defines three formats:;To; ;;;[o;;0;[o;;[I"(One for most situations (as above):;Fo;;[I"irb(main):003> Dir ;FI"=> Dir ;F;0o;;0;[o;;[I"YOne for when the typed command is a statement continuation (adds trailing asterisk):;Fo;;[I"irb(main):004* Dir. ;F;0o;;0;[o;;[I"ZOne for when the typed command is a string continuation (adds trailing single-quote):;Fo;;[I"#irb(main):005' Dir.entries('. ;F;0o;;[I"OYou can see the prompt change as you type the characters in the following:;To;;[ I"7irb(main):001* Dir.entries('.').select do |entry| ;TI"-irb(main):002* entry.start_with?('R') ;TI"irb(main):003> end ;TI""=> ["README.md", "Rakefile"] ;T;0S; ; i ;I"Pre-Defined Prompts;To;;[I"XIRB has several pre-defined prompts, stored in hash <code>IRB.conf[:PROMPT]</code>:;To;;[I"+irb(main):001> IRB.conf[:PROMPT].keys ;TI">=> [:NULL, :DEFAULT, :CLASSIC, :SIMPLE, :INF_RUBY, :XMP] ;T;0o;;[I"ITo see the full data for these, type <code>IRB.conf[:PROMPT]</code>.;To;;[I"�Most of these prompt definitions include specifiers that represent values like the IRB name, session name, and line number; see {Prompt Specifiers}[rdoc-ref:IRB@Prompt+Specifiers].;To;;[I"<You can change the initial prompt and return format by:;To; ;;;[o;;0;[o;;[I"{Adding to the configuration file: <code>IRB.conf[:PROMPT] = *mode*</code> where _mode_ is the symbol name of a prompt mode.;Fo;;0;[o;;[I""Giving a command-line option:;Fo; ;;;[ o;;0;[o;;[I"t<code>--prompt *mode*</code>: sets the prompt mode to _mode_. where _mode_ is the symbol name of a prompt mode.;To;;0;[o;;[I"s<code>--simple-prompt</code> or <code>--sample-book-mode</code>: sets the prompt mode to <code>:SIMPLE</code>.;To;;0;[o;;[I"�<code>--inf-ruby-mode</code>: sets the prompt mode to <code>:INF_RUBY</code> and suppresses both <code>--multiline</code> and <code>--singleline</code>.;To;;0;[o;;[I"L<code>--noprompt</code>: suppresses prompting; does not affect echoing.;To;;[I"AYou can retrieve or set the current prompt mode with methods;To;;[I"F<code>conf.prompt_mode</code> and <code>conf.prompt_mode=</code>.;To;;[I"~If you're interested in prompts and return formats other than the defaults, you might experiment by trying some of the others.;TS; ; i ;I"Custom Prompts;To;;[I"You can also define custom prompts and return formats, which may be done either in an IRB session or in the configuration file.;To;;[I"zA prompt in IRB actually defines three prompts, as seen above. For simple custom data, we'll make all three the same:;To;;[I"6irb(main):001* IRB.conf[:PROMPT][:MY_PROMPT] = { ;TI"&irb(main):002* PROMPT_I: ': ', ;TI"&irb(main):003* PROMPT_C: ': ', ;TI"&irb(main):004* PROMPT_S: ': ', ;TI"$irb(main):005* RETURN: '=> ' ;TI"irb(main):006> } ;TI"L=> {:PROMPT_I=>": ", :PROMPT_C=>": ", :PROMPT_S=>": ", :RETURN=>"=> "} ;T;0o;;[I"rIf you define the custom prompt in the configuration file, you can also make it the current prompt by adding:;To;;[I")IRB.conf[:PROMPT_MODE] = :MY_PROMPT ;T;0o;;[I"WRegardless of where it's defined, you can make it the current prompt in a session:;To;;[I"#conf.prompt_mode = :MY_PROMPT ;T;0o;;[I"WYou can view or modify the current prompt data with various configuration methods:;To; ;;;[ o;;0;[o;;[I"C<code>conf.prompt_mode</code>, <code>conf.prompt_mode=</code>.;To;;0;[o;;[I"6<code>conf.prompt_c</code>, <code>conf.c=</code>.;To;;0;[o;;[I"6<code>conf.prompt_i</code>, <code>conf.i=</code>.;To;;0;[o;;[I"6<code>conf.prompt_s</code>, <code>conf.s=</code>.;To;;0;[o;;[I"B<code>conf.return_format</code>, <code>return_format=</code>.;TS; ; i ;I"Prompt Specifiers;To;;[I"[A prompt's definition can include specifiers for which certain values are substituted:;To; ;;;[o;;0;[o;;[I"6<code>%N</code>: the name of the running program.;To;;0;[o;;[I":<code>%m</code>: the value of <code>self.to_s</code>.;To;;0;[o;;[I"=<code>%M</code>: the value of <code>self.inspect</code>.;To;;0;[o;;[I"|<code>%l</code>: an indication of the type of string; one of <code>"</code>, <code>'</code>, <code>/</code>, <code>]</code>.;To;;0;[o;;[I"�<code>%NNi</code>: Indentation level. NN is a 2-digit number that specifies the number of digits of the indentation level (03 will result in 001).;To;;0;[o;;[I"�<code>%NNn</code>: Line number. NN is a 2-digit number that specifies the number of digits of the line number (03 will result in 001).;To;;0;[o;;[I"-<code>%%</code>: Literal <code>%</code>.;TS; ; i;I"Verbosity;To;;[I"bBy default, IRB verbosity is disabled, which means that output is smaller rather than larger.;To;;[I"!You can enable verbosity by:;To; ;;;[o;;0;[o;;[I"pAdding to the configuration file: <code>IRB.conf[:VERBOSE] = true</code> (the default is <code>nil</code>).;To;;0;[o;;[I"bGiving command-line options <code>--verbose</code> (the default is <code>--noverbose</code>).;To;;[I"During a session, you can retrieve or set verbosity with methods <code>conf.verbose</code> and <code>conf.verbose=</code>.;TS; ; i;I" Help;To;;[I"[Command-line option <code>--version</code> causes IRB to print its help text and exit.;TS; ; i;I"Version;To;;[I"^Command-line option <code>--version</code> causes IRB to print its version text and exit.;TS; ; i;I"Input and Output;TS; ; i;I"Color Highlighting;To;;[I"IBy default, IRB color highlighting is enabled, and is used for both:;To; ;;;[o;;0;[o;;[I"�Input: As you type, IRB reads the typed characters and highlights elements that it recognizes; it also highlights errors such as mismatched parentheses.;To;;0;[o;;[I"1Output: IRB highlights syntactical elements.;To;;[I"+You can disable color highlighting by:;To; ;;;[o;;0;[o;;[I"}Adding to the configuration file: <code>IRB.conf[:USE_COLORIZE] = false</code> (the default value is <code>true</code>).;To;;0;[o;;[I"9Giving command-line option <code>--nocolorize</code>;TS; ; i;I"Debugging;To;;[I"�Command-line option <code>-d</code> sets variables <code>$VERBOSE</code> and <code>$DEBUG</code> to <code>true</code>; these have no effect on IRB output.;TS; ; i;I" Warnings;To;;[I"=Command-line option <code>-w</code> suppresses warnings.;To;;[I"ECommand-line option <code>-W[*level*]</code> sets warning level;;To; ;;;[o;;0;[o;;[I"0=silence;To;;0;[o;;[I" 1=medium;To;;0;[o;;[I"2=verbose;TS; ; i;I"Other Features;TS; ; i;I"Load Modules;To;;[I"MYou can specify the names of modules that are to be required at startup.;To;;[I"�Array <code>conf.load_modules</code> determines the modules (if any) that are to be required during session startup. The array is used only during session startup, so the initial value is the only one that counts.;To;;[I"DThe default initial value is <code>[]</code> (load no modules):;To;;[I"&irb(main):001> conf.load_modules ;TI"=> [] ;T;0o;;[I"/You can set the default initial value via:;To; ;;;[o;;0;[o;;[I"(Command-line option <code>-r</code>;Fo;;[I" $ irb -r csv -r json ;FI"&irb(main):001> conf.load_modules ;FI"=> ["csv", "json"] ;F;0o;;0;[o;;[I"?Hash entry <code>IRB.conf[:LOAD_MODULES] = *array*</code>:;Fo;;[I"-IRB.conf[:LOAD_MODULES] = %w[csv, json] ;F;0o;;[I"ONote that the configuration file entry overrides the command-line options.;TS; ; i;I"!RI Documentation Directories;To;;[I"�You can specify the paths to RI documentation directories that are to be loaded (in addition to the default directories) at startup; see details about RI by typing <code>ri --help</code>.;To;;[I"�Array <code>conf.extra_doc_dirs</code> determines the directories (if any) that are to be loaded during session startup. The array is used only during session startup, so the initial value is the only one that counts.;To;;[I"PThe default initial value is <code>[]</code> (load no extra documentation):;To;;[I"(irb(main):001> conf.extra_doc_dirs ;TI"=> [] ;T;0o;;[I"/You can set the default initial value via:;To; ;;;[o;;0;[o;;[I"5Command-line option <code>--extra_doc_dir</code>;Fo;;[I"C$ irb --extra-doc-dir your_doc_dir --extra-doc-dir my_doc_dir ;FI"(irb(main):001> conf.extra_doc_dirs ;FI"'=> ["your_doc_dir", "my_doc_dir"] ;F;0o;;0;[o;;[I"AHash entry <code>IRB.conf[:EXTRA_DOC_DIRS] = *array*</code>:;Fo;;[I"=IRB.conf[:EXTRA_DOC_DIRS] = %w[your_doc_dir my_doc_dir] ;F;0o;;[I"ONote that the configuration file entry overrides the command-line options.;TS; ; i;I" IRB Name;To;;[I"$You can specify a name for IRB.;To;;[I"5The default initial value is <code>'irb'</code>:;To;;[I""irb(main):001> conf.irb_name ;TI"=> "irb" ;T;0o;;[I"fYou can set the default initial value via hash entry <code>IRB.conf[:IRB_NAME] = *string*</code>:;To;;[I"!IRB.conf[:IRB_NAME] = 'foo' ;T;0S; ; i;I"Application Name;To;;[I"=You can specify an application name for the IRB session.;To;;[I"5The default initial value is <code>'irb'</code>:;To;;[I"!irb(main):001> conf.ap_name ;TI"=> "irb" ;T;0o;;[I"eYou can set the default initial value via hash entry <code>IRB.conf[:AP_NAME] = *string*</code>:;To;;[I"'IRB.conf[:AP_NAME] = 'my_ap_name' ;T;0S; ; i;I"Configuration Monitor;To;;[I"}You can monitor changes to the configuration by assigning a proc to <code>IRB.conf[:IRB_RC]</code> in the configuration file:;To;;[I"8IRB.conf[:IRB_RC] = proc {|conf| puts conf.class } ;T;0o;;[I"aEach time the configuration is changed, that proc is called with argument <code>conf</code>:;TS; ; i;I"Encodings;To;;[I"lCommand-line option <code>-E *ex*[:*in*]</code> sets initial external (ex) and internal (in) encodings.;To;;[I"<Command-line option <code>-U</code> sets both to UTF-8.;TS; ; i;I" Commands;To;;[I"TPlease use the <code>help</code> command to see the list of available commands.;TS; ; i;I"IRB Sessions;To;;[I"PIRB has a special feature, that allows you to manage many sessions at once.;To;;[I"~You can create new sessions with Irb.irb, and get a list of current sessions with the <code>jobs</code> command in the prompt.;TS; ; i ;I"Configuration;To;;[I"TThe command line options, or IRB.conf, specify the default behavior of Irb.irb.;To;;[I"hOn the other hand, each conf in IRB@Command-Line+Options is used to individually configure IRB.irb.;To;;[I"�If a proc is set for <code>IRB.conf[:IRB_RC]</code>, its will be invoked after execution of that proc with the context of the current session as its argument. Each session can be configured using this mechanism.;TS; ; i ;I"Session variables;To;;[I"KThere are a few variables in every Irb session that can come in handy:;To;;[I"�<code>_</code> : The value command executed, as a local variable <code>__</code> : The history of evaluated commands. Available only if <code>IRB.conf[:EVAL_HISTORY]</code> is not <code>nil</code> (which is the default). See also IRB::Context#eval_history= and IRB::History. <code>__[line_no]</code> : Returns the evaluation value at the given line number, <code>line_no</code>. If <code>line_no</code> is a negative, the return value <code>line_no</code> many lines before the most recent return value.;TS; ; i;I"Restrictions;To;;[I"SRuby code typed into IRB behaves the same as Ruby code in a file, except that:;To; ;;;[o;;0;[o;;[I"xBecause IRB evaluates input immediately after it is syntactically complete, some results may be slightly different.;To;;0;[o;;[I"%Forking may not be well behaved.;T: @fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below0o;;[ ;I"lib/irb/color_printer.rb;T;0o;;[ ;I"!lib/irb/command/backtrace.rb;T;0o;;[o;;[I" nop.rb -;To;;[I",by Keiju ISHITSUKA(keiju@ruby-lang.org);T;0;I"lib/irb/command/base.rb;T;0o;;[ ;I"lib/irb/command/break.rb;T;0o;;[ ;I"lib/irb/command/catch.rb;T;0o;;[ ;I"lib/irb/command/chws.rb;T;0o;;[ ;I"lib/irb/command/context.rb;T;0o;;[ ;I" lib/irb/command/continue.rb;T;0o;;[ ;I"lib/irb/command/debug.rb;T;0o;;[ ;I"lib/irb/command/delete.rb;T;0o;;[ ;I"#lib/irb/command/disable_irb.rb;T;0o;;[ ;I"lib/irb/command/edit.rb;T;0o;;[ ;I"lib/irb/command/exit.rb;T;0o;;[ ;I"lib/irb/command/finish.rb;T;0o;;[ ;I""lib/irb/command/force_exit.rb;T;0o;;[ ;I"lib/irb/command/help.rb;T;0o;;[ ;I"lib/irb/command/history.rb;T;0o;;[ ;I"lib/irb/command/info.rb;T;0o;;[ ;I"(lib/irb/command/internal_helpers.rb;T;0o;;[ ;I" lib/irb/command/irb_info.rb;T;0o;;[ ;I"lib/irb/command/load.rb;T;0o;;[ ;I"lib/irb/command/ls.rb;T;0o;;[ ;I"lib/irb/command/measure.rb;T;0o;;[ ;I"lib/irb/command/next.rb;T;0o;;[ ;I"lib/irb/command/pushws.rb;T;0o;;[ ;I" lib/irb/command/show_doc.rb;T;0o;;[ ;I"#lib/irb/command/show_source.rb;T;0o;;[ ;I"lib/irb/command/step.rb;T;0o;;[o;;[I"multi.rb -;To;;[I",by Keiju ISHITSUKA(keiju@ruby-lang.org);T;0;I"lib/irb/command/subirb.rb;T;0o;;[ ;I" lib/irb/command/whereami.rb;T;0o;;[ ;I"lib/irb/completion.rb;T;0o;;[ ;I"lib/irb/context.rb;T;0o;;[ ;I"lib/irb/debug.rb;T;0o;;[ ;I"lib/irb/debug/ui.rb;T;0o;;[ ;I" lib/irb/default_commands.rb;T;0o;;[ ;I"lib/irb/easter-egg.rb;T;0o;;[o;;[I"+irb/multi-irb.rb - multiple irb module;To;;[I",by Keiju ISHITSUKA(keiju@ruby-lang.org);T;0;I"lib/irb/ext/multi-irb.rb;T;0o;;[ ;I"lib/irb/ext/tracer.rb;T;0o;;[ ;I"lib/irb/ext/use-loader.rb;T;0o;;[o;;[I"frame.rb -;To;;[I"8by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd);T;0;I"lib/irb/frame.rb;T;0o;;[o;;[I"%irb/help.rb - print usage module;To;;[I",by Keiju ISHITSUKA(keiju@ishitsuka.com);T;0;I"lib/irb/help.rb;T;0o;;[ ;I"lib/irb/helper_method.rb;T;0o;;[ ;I""lib/irb/helper_method/base.rb;T;0o;;[ ;I""lib/irb/helper_method/conf.rb;T;0o;;[ ;I"lib/irb/history.rb;T;0o;;[ ;I"lib/irb/input-method.rb;T;0o;;[o;;[I"irb/lc/error.rb -;To;;[I",by Keiju ISHITSUKA(keiju@ruby-lang.org);T;0;I"lib/irb/lc/error.rb;T;0o;;[o;;[I"irb/lc/ja/error.rb -;To;;[I",by Keiju ISHITSUKA(keiju@ruby-lang.org);T;0;I"lib/irb/lc/ja/error.rb;T;0o;;[ ;I"lib/irb/nesting_parser.rb;T;0o;;[ ;I"lib/irb/notifier.rb;T;0o;;[o;;[I"2output-method.rb - output methods used by irb;To;;[I",by Keiju ISHITSUKA(keiju@ruby-lang.org);T;0;I"lib/irb/output-method.rb;T;0o;;[ ;I"lib/irb/pager.rb;T;0o;;[ ;I"lib/irb/ruby-lex.rb;T;0o;;[ ;I"lib/irb/source_finder.rb;T;0o;;[ ;I"lib/irb/statement.rb;T;0;0;0[ [U:RDoc::Constant[i I"ExtendCommand;TI"IRB::ExtendCommand;T:publicI"IRB::Command;To;;[ ;@};0@}@cRDoc::NormalModule0U;[i I"TOPLEVEL_BINDING;TI"IRB::TOPLEVEL_BINDING;T;0o;;[ ;I"lib/irb/workspace.rb;T;0@�@@�0[ [[I" class;T[[;[ [:protected[ [:private[[I"easter_egg;TI"lib/irb/easter-egg.rb;T[I"easter_egg_logo;T@�[I" start;TI"lib/irb.rb;T[I" instance;T[[;[ [;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[KI"lib/irb.rb;TI"lib/irb/color.rb;TI"lib/irb/color_printer.rb;TI"lib/irb/command.rb;TI"!lib/irb/command/backtrace.rb;TI"lib/irb/command/base.rb;TI"lib/irb/command/break.rb;TI"lib/irb/command/catch.rb;TI"lib/irb/command/chws.rb;TI"lib/irb/command/context.rb;TI" lib/irb/command/continue.rb;TI"lib/irb/command/debug.rb;TI"lib/irb/command/delete.rb;TI"#lib/irb/command/disable_irb.rb;TI"lib/irb/command/edit.rb;TI"lib/irb/command/exit.rb;TI"lib/irb/command/finish.rb;TI""lib/irb/command/force_exit.rb;TI"lib/irb/command/help.rb;TI"lib/irb/command/history.rb;TI"lib/irb/command/info.rb;TI"(lib/irb/command/internal_helpers.rb;TI" lib/irb/command/irb_info.rb;TI"lib/irb/command/load.rb;TI"lib/irb/command/ls.rb;TI"lib/irb/command/measure.rb;TI"lib/irb/command/next.rb;TI"lib/irb/command/pushws.rb;TI" lib/irb/command/show_doc.rb;TI"#lib/irb/command/show_source.rb;TI"lib/irb/command/step.rb;TI"lib/irb/command/subirb.rb;TI" lib/irb/command/whereami.rb;TI"lib/irb/completion.rb;TI"lib/irb/context.rb;TI"lib/irb/debug.rb;TI"lib/irb/debug/ui.rb;TI" lib/irb/default_commands.rb;TI"lib/irb/easter-egg.rb;TI"lib/irb/ext/change-ws.rb;TI" lib/irb/ext/eval_history.rb;TI"lib/irb/ext/loader.rb;TI"lib/irb/ext/multi-irb.rb;TI"lib/irb/ext/tracer.rb;TI"lib/irb/ext/use-loader.rb;TI"lib/irb/ext/workspaces.rb;TI"lib/irb/frame.rb;TI"lib/irb/help.rb;TI"lib/irb/helper_method.rb;TI""lib/irb/helper_method/base.rb;TI""lib/irb/helper_method/conf.rb;TI"lib/irb/history.rb;TI"lib/irb/init.rb;TI"lib/irb/input-method.rb;TI"lib/irb/inspector.rb;TI"lib/irb/lc/error.rb;TI"lib/irb/lc/ja/error.rb;TI"lib/irb/locale.rb;TI"lib/irb/nesting_parser.rb;TI"lib/irb/notifier.rb;TI"lib/irb/output-method.rb;TI"lib/irb/pager.rb;TI"lib/irb/ruby-lex.rb;TI"lib/irb/source_finder.rb;TI"lib/irb/statement.rb;TI"lib/irb/version.rb;TI"lib/irb/workspace.rb;TI"lib/irb/ws-for-case-2.rb;TI"lib/irb/xmp.rb;TI"lib/un.rb;T@�cRDoc::TopLevel