Ruby/Number/next

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

Версия от 17:59, 13 сентября 2010; ViGOur (Обсуждение | вклад)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Содержание

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