Get the next integer with next (or its alias succ): : Numeric class « Number « Ruby
- Ruby
- Number
- Numeric class
Get the next integer with next (or its alias succ):
-24.next # => -23
1.next # => 2
999.next # => 1000
Related examples in the same category