From: "M. Edward (Ed) Borasky" Date: 2008-07-11T23:13:10+09:00 Subject: Re: Beginner: if statement in one line? --------------000004010906080008010000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Chris Chris wrote: > Hi, > > 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? puts '5' if 5 == 5 > > Just writing them all statements together in one line didn't work, > and a syntax like if 5 == 5 {puts '5'} end didn't either. > > Thanks for your help. > > CHeers, CHris -- M. Edward (Ed) Borasky http://ruby-perspectives.blogspot.com/ "A mathematician is a machine for turning coffee into theorems." -- Alfr��d R��nyi via Paul Erd��s --------------000004010906080008010000 Content-Type: text/x-vcard; charset=utf-8; name="znmeb.vcf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="znmeb.vcf" YmVnaW46dmNhcmQNCmZuOk0uIEVkd2FyZCAoRWQpIEJvcmFza3kNCm46O00uIEVkd2FyZCAo RWQpIEJvcmFza3kNCmVtYWlsO2ludGVybmV0OnpubWViQGNlc21haWwubmV0DQp4LW1vemls bGEtaHRtbDpGQUxTRQ0KdmVyc2lvbjoyLjENCmVuZDp2Y2FyZA0KDQo= --------------000004010906080008010000--