From: Sandro Paganotti Date: 2008-07-11T21:12:56+09:00 Subject: Re: Beginner: if statement in one line? ------=_Part_41931_18686602.1215778624934 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline for if / else oneliners you can use also ( [condition] ? [true] : [false] ) es: puts ( 5 == 5 ? "equal!" : "not equal!" ) On Fri, Jul 11, 2008 at 11:11 AM, akl wrote: > Chris Chris schrieb: > > How can I put a statement like >> >> if 5 == 5 >> puts '5' >> end >> >> in one line? >> > > puts '5' if 5 == 5 > > ;) > > Greetings > > -- Emo Philips - "I got some new underwear the other day. Well, new to me." ------=_Part_41931_18686602.1215778624934--