[BUG] Broken indentation
Sam Roberts
sroberts at uniserve.com
Sun Apr 10 09:47:48 EDT 2005
Quoting dougkearns at gmail.com, on Sun, Apr 10, 2005 at 11:31:35PM +1000:
> On Sun, Apr 10, 2005 at 03:04:54PM +0200, Nikolai Weibull wrote:
> > Gavin Sinclair, April 10:
> >
> > > > foo do
> > > > bar
> > > > rescue
> > > > nil
> > > > end
> >
> > > Is that valid Ruby? (I wish it was.) You need an explicit 'begin ...
> > > end'. Tilman's point stands.
> >
> > Actually, it's valid;
>
> It is?
Pretty sure, I found out recently. Handy for doing:
foo = method_that_may_raise('an arg') rescue nil
foo should be set to nil if something derived from StandardError is
raised, if I recall correctly.
Sam
More information about the vim-ruby-devel
mailing list