Installing Ruby
There is a good chance your operating system already has Ruby installed. Try typing ruby --version at a command prompt—you may be pleasantly surprised. But you’re likely to find that the Ruby version is out of date. For example, at the time of this writing, MacOS ships with Ruby 2.6.10, which is multiple versions behind the current Ruby.
The examples in this book are written against Ruby 3.3. While most of the code will work in older versions of Ruby, for performance and security reasons you should try to get on the most current version. Refer to Appendix 5, Ruby Changes, for a listing of the features added and changes made to Ruby at each iteration.
You can install Ruby in a variety of different ways, so providing general ...
Get Programming Ruby 3.3 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.