Ruby Language IRB

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

IRB means "Interactive Ruby Shell". Basically it lets you execute ruby commands in real time (like the normal shell does). IRB is an indispensable tool when dealing with Ruby API. Works as classical rb script. Use it for short and easy commands. One of the nice IRB functions is that when you press tab while typing a method it will give you an advice to what you can use (This is not an IntelliSense)

Parameters

OptionDetails
-fSuppress read of ~/.irbrc
-mBc mode (load mathn, fraction or matrix are available)
-dSet $DEBUG to true (same as `ruby -d')
-r load-moduleSame as `ruby -r'
-I pathSpecify $LOAD_PATH directory
-USame as ruby -U
-E encSame as ruby -E
-wSame as ruby -w
-W[level=2]Same as ruby -W
--inspectUse `inspect' for output (default except for bc mode)
--noinspectDon't use inspect for output
--readlineUse Readline extension module
--noreadlineDon't use Readline extension module
--prompt prompt-modeSwitch prompt mode. Pre-defined prompt modes are default',simple', xmp' andinf-ruby'
--inf-ruby-modeUse prompt appropriate for inf-ruby-mode on emacs. Suppresses --readline.
--simple-promptSimple prompt mode
--nopromptNo prompt mode
--tracerDisplay trace for each execution of commands.
--back-trace-limit nDisplay backtrace top n and tail n. The default value is 16.
--irb_debug nSet internal debug level to n (not for popular use)
-v, --versionPrint the version of irb


Got any Ruby Language Question?