From: mark hahn Date: 2001-11-22T09:01:40+09:00 Subject: [ruby-talk:26095] Re: positive I spent some time looking for max(a,b) in ruby before discovering and using [a,b].max. I was/am very confused about this. Is this a violation of pols or is it just more object oriented? ----- Original Message ----- From: "Niklas Frykholm" To: "ruby-talk ML" Sent: Wednesday, November 21, 2001 12:38 PM Subject: [ruby-talk:26069] Re: positive > [Tobias Reif] > > how can I say "if you're positive: stay; if you're negative: become zero"? > > > > something like > > 10.pos -> 10 > > -10.pos -> 0 > > IMHO, the Ruby way is: > > [x,0].max > > // Niklas >