irb: add examples (#23589)

* irb: add examples

* irb: remove redundant description
This commit is contained in:
Fazle Arefin
2026-08-16 13:06:24 +10:00
committed by GitHub
parent 8f16a092e2
commit 7bd4dc1437
+20 -1
View File
@@ -1,9 +1,28 @@
# irb
> Interactive Ruby shell.
> Evaluate Ruby code read from `stdin`.
> More information: <https://ruby.github.io/irb/>.
- Start the interactive shell:
`irb`
- Start the interactive shell with the simple prompt:
`irb --simple-prompt`
- Start the interactive shell without reading the configuration file:
`irb -f`
- Evaluate Ruby code read from `stdin`:
`echo "{{puts 'Hello world'}}" | irb --noecho`
- Display help:
`irb {{[-h|--help]}}`
- Display version:
`irb {{[-v|--version]}}`