Usage: /usr/bin/ruby [switches] [--] [programfile] [arguments]
-0[octal] specify record separator (\0, if no argument)
-a autosplit mode with -n or -p (splits $_ into $F)
-c check syntax only
-Cdirectory cd to directory before executing your script
-d, --debug set debugging flags (set $DEBUG to true)
-e 'command' one line of script. Several -e's allowed. Omit [programfile]
-Eex[:in], --encoding=ex[:in]
specify the default external and internal character encodings
-Fpattern split() pattern for autosplit (-a)
-i[extension] edit ARGV files in place (make backup if extension supplied)
-Idirectory specify $LOAD_PATH directory (may be used more than once)
-l enable line ending processing
-n assume 'while gets(); ... end' loop around your script
-p assume loop like -n but print line also like sed
-rlibrary require the library before executing your script
-s enable some switch parsing for switches after script name
-S look for the script using PATH environment variable
-v print the version number, then turn on verbose mode
-w turn warnings on for your script
-W[level=2|:category]
set warning level; 0=silence, 1=medium, 2=verbose
-x[directory] strip off text before #!ruby line and perhaps cd to directory
--jit enable JIT for the platform, same as --yjit (experimental)
--mjit enable C compiler-based JIT compiler (experimental)
--yjit enable in-process JIT compiler (experimental)
--copyright print the copyright
--dump={insns|parsetree|...}[,...]
dump debug information. see below for available dump list
--enable={mjit|rubyopt|...}[,...], --disable={mjit|rubyopt|...}[,...]
enable or disable features. see below for available features
--external-encoding=encoding, --internal-encoding=encoding
specify the default external or internal character encoding
--backtrace-limit=num
limit the maximum length of backtrace
--verbose turn on verbose mode and disable script from stdin
--version print the version number, then exit
--help show this message, -h for short message
Dump List:
insns instruction sequences
insns_without_opt
instruction sequences compiled with no optimization
yydebug yydebug of yacc parser generator
parsetree AST
parsetree_with_comment
AST with comments
Features:
gems rubygems (only for debugging, default: enabled)
error_highlight error_highlight (default: enabled)
did_you_mean did_you_mean (default: enabled)
rubyopt RUBYOPT environment variable (default: enabled)
frozen-string-literal
freeze all string literals (default: disabled)
mjit C compiler-based JIT compiler (default: disabled)
yjit in-process JIT compiler (default: disabled)
Warning categories:
deprecated deprecated features
experimental experimental features
MJIT options (experimental):
--mjit-warnings Enable printing JIT warnings
--mjit-debug Enable JIT debugging (very slow), or add cflags if specified
--mjit-wait Wait until JIT compilation finishes every time (for testing)
--mjit-save-temps
Save JIT temporary files in $TMP or /tmp (for testing)
--mjit-verbose=num
Print JIT logs of level num or less to stderr (default: 0)
--mjit-max-cache=num
Max number of methods to be JIT-ed in a cache (default: 10000)
--mjit-min-calls=num
Number of calls to trigger JIT (for testing, default: 10000)
YJIT options (experimental):
--yjit-exec-mem-size=num
Size of executable memory block in MiB (default: 256)
--yjit-call-threshold
Number of calls to trigger JIT (default: 10)
--yjit-max-versions
Maximum number of versions per basic block (default: 4)
--yjit-greedy-versioning
Greedy versioning mode (default: disabled)
Options (41)
| Option | Description | Source |
|---|---|---|
-0 octal | specify record separator (\0, if no argument) | help |
-a | autosplit mode with -n or -p (splits $_ into $F) | help |
-c | check syntax only | help |
-Cdirectory | cd to directory before executing your script | help |
-d, --debug | set debugging flags (set $DEBUG to true) | help |
-e 'command' | one line of script. | help |
-Eex, --encoding :in | specify the default external and internal character encodings | help |
-Fpattern | split() pattern for autosplit (-a) | help |
-i extension | edit ARGV files in place (make backup if extension supplied) | help |
-Idirectory | specify $LOAD_PATH directory (may be used more than once) | help |
-l | enable line ending processing | help |
-n | assume 'while gets(); | help |
-p | assume loop like -n but print line also like sed | help |
-rlibrary | require the library before executing your script | help |
-s | enable some switch parsing for switches after script name | help |
-S | look for the script using PATH environment variable | help |
-v | print the version number, then turn on verbose mode | help |
-w | turn warnings on for your script | help |
-W level=2|:category | set warning level; | help |
-x directory | strip off text before #!ruby line and perhaps cd to directory | help |
--jit | enable JIT for the platform, same as --yjit (experimental) | help |
--mjit | enable C compiler-based JIT compiler (experimental) | help |
--yjit | enable in-process JIT compiler (experimental) | help |
--copyright | print the copyright | help |
--dump insns|parsetree|... | dump debug information. | help |
--enable, --disable mjit|rubyopt|... | enable or disable features. | help |
--external-encoding, --internal-encoding encoding | specify the default external or internal character encoding | help |
--backtrace-limit num | limit the maximum length of backtrace | help |
--verbose | turn on verbose mode and disable script from stdin | help |
--version | print the version number, then exit | help |
--help | show this message, -h for short message | help |
--mjit-debug | Enable JIT debugging (very slow), or add cflags if specified | help |
--mjit-wait | Wait until JIT compilation finishes every time (for testing) | help |
--mjit-save-temps | Save JIT temporary files in $TMP or /tmp (for testing) | help |
--mjit-verbose num | Print JIT logs of level num or less to stderr (default: 0) | help |
--mjit-max-cache num | Max number of methods to be JIT-ed in a cache (default: 10000) | help |
--mjit-min-calls num | Number of calls to trigger JIT (for testing, default: 10000) | help |
--yjit-exec-mem-size num | Size of executable memory block in MiB (default: 256) | help |
--yjit-call-threshold | Number of calls to trigger JIT (default: 10) | help |
--yjit-max-versions | Maximum number of versions per basic block (default: 4) | help |
--yjit-greedy-versioning | Greedy versioning mode (default: disabled) | help |