Ruby/Range/max

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

(Различия между версиями)
Перейти к: навигация, поиск

Версия 17:10, 26 мая 2010

The max Function gives the highest number in the range:

range1 = 1..100
puts range1.max
# The output of this code is 100.