Learn to Program. "Chris teaches the basics, but also shows you how to think like a programmer."
Programming Ruby ("The Pickaxe"). "This updated edition is a comprehensive reference on the language itself, with a tutorial on the most important features of Ruby—including pattern matching and Ractors—and describes the language through Ruby 3.3."