O'Reilly logo

Ruby by Example by Kevin C. Baird

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Programmer Utilities

image with no caption

This chapter is primarily geared toward tools that reveal more about Ruby, making the programmer’s job both easier and more interesting. We’ll revisit a few topics we broached in a cursory fashion earlier in the book, this time giving them more attention.

#5 What Is Truth? (boolean_golf.rb)

Back in Chapter 1, we talked about how various languages convert data from one type to another. You’ll remember that this process is called casting, and Ruby generally requires programmers to do this explicitly, while some other languages provide shortcuts that implicitly cast data.

The one major exception to this policy in Ruby is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required