Ruby 4.0
We are going to use Ruby 4.0. Most examples will also run on Ruby
3.x, but the output formatting in this book matches Ruby 4.0. You
can check the installed Ruby version by running the command
ruby -v:
$ ruby -v
ruby 4.0.2 (2026-03-17 revision d3da9fec82) +PRISM [arm64-darwin25]
$
| If your system runs an older version and you want to upgrade it have a look at mise which is my preferred way of installing and using different Ruby versions. See the install appendix for a step-by-step guide. |