From: Joel VanderWerf Date: 2009-02-21T07:46:23+09:00 Subject: Re: difference between {} and do/end David Masover wrote: > Jeff Schwab wrote: >> I'm coming back to Ruby after a couple years away, and finding I've >> forgotten some of the basics. What's the difference between { ... } >> blocks and do ... end blocks? > > Another difference is that {} can be confused with a hash literal. I > can't think of a good example where it's actually ambiguous, though. Isn't p {1=>2} such an example? The parser decides that it's a block and barfs on the =>. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407