No increment operator (++) in Ruby? [duplicate]
Ruby has no pre/post increment/decrement operator. For instance, x++ or x– will fail to parse. More importantly, ++x or –x will do nothing! In fact, they behave as multiple unary prefix operators: -x == —x == —–x == …… To increment a number, simply write x += 1. Taken from “Things That Newcomers to Ruby … Read more