From: Drew Olson Date: 2006-10-12T01:02:20+09:00 Subject: Re: Compact if statement for Codegolf unknown wrote: > On Thu, 12 Oct 2006, Drew Olson wrote: > >> I'm working on my codegolfing skills and was wondering, what is the >> shortest possible way to write the following in ruby: >> >> if a==0 >> 1 >> else >> 2 >> end > > a==0?1:2 > > > Kirk Haines Exactly what I was looking for! Thanks! -- Posted via http://www.ruby-forum.com/.