Chapter Recap

What was new in this chapter?

  • End-of-line differences among operating systems

  • Regular expressions, including the ? counter

  • The sprintf method

  • Multiplication of Arrays

  • The inject method

  • Regular expressions with the + counter

  • Objects as the results of blocks

  • Calling successive methods on the output of methods (“chaining” methods)

  • Using new methods of Open Classes in quick scripts

  • Multiplication of Strings

  • The grep method

  • The map method

  • The Range class

  • Recursion

That’s quite a bit, including some important new functional concepts like recursion and a few very handy functional methods. You’ll need these concepts as we move on. Let’s proceed to some more complex treatment of numbers in Chapter 5.

Get Ruby by Example 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.