From: "Darryl L. Pierce" Date: 2008-07-12T02:55:54+09:00 Subject: Re: Beginner: if statement in one line? Chris Chris wrote: > a simple question, however I did not find an answer for this: > > How can I put a statement like > > if 5 == 5 > puts '5' > end > > in one line? Sure, and make it a little more readable too: puts '5' if 5 == 5 # The condition can be at the end of the line. :) -- Darryl L. Pierce http://mcpierce.multiply.com/ "What do you care what people think, Mr. Feynman?" ** Posted from http://www.teranews.com **