From: Dave Bass Date: 2008-07-12T21:09:48+09:00 Subject: Re: Beginner: if statement in one line? Chris Chris wrote: > and a syntax like if 5 == 5 {puts '5'} end didn't either. Be aware that { } blocks in Ruby don't have the same meaning as { } blocks in C-like languages. They're not used for grouping statements; rather, they're used as code blocks (cf. anonymous subroutines, closures etc). Also, { } is an empty hash, which can sometimes be confusing. x = lambda { } # an empty code block x = { } # an empty hash Dave -- Posted via http://www.ruby-forum.com/.