[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

assign greater of two ints?

Earle Clubb

6/22/2007 7:21:00 PM

Is there a more concise way to write this?

a = 5
b = "test123"
if a < b.length
a = b.length
end

--or--

a = b.length if a < b.length

Earle

--
Posted via http://www.ruby-....