concept point in category ruby

appears as: point, points, The point, points, point
The Well-Grounded Rubyist, Third Edition

This is an excerpt from Manning's book The Well-Grounded Rubyist, Third Edition.

The error is reported on line 5—the last line of the program—because Ruby waits patiently to see whether you’re ever going to close the parenthesis before concluding that you’re not. On some systems, the last line of output includes a carat indicating the point at which Ruby declared the syntax error—again, at the very end of the program.

One way to remember is to think of a range as always reaching to the point represented by whatever follows the second dot. In an inclusive range, the point after the second dot is the end value of the range. In this example, the value 100 is included in the range:

We’ve looked closely at Ruby’s major core container classes, Array and Hash. We’ve also looked at ranges, which principally operate as inclusion test criteria but know how to behave as collections when their makeup permits them to (a point that will make more sense after you’ve seen more about the Enumerable module). After ranges, we looked at sets, which are defined in the standard library and add another important tool to Ruby’s collection toolset. The source code for the Set class is written in Ruby; that gave us an opportunity to look at some real production Ruby code.