Ruby/Number/next

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск

Содержание

Get the next from a negative number

-24.next # => -23



Get the next value for a positive number

1.next # => 2



Next from s an integer

2008.next # => 2009



next number of 999

999.next # => 1000