From: Lee Jarvis Date: 2007-12-12T17:46:09+09:00 Subject: Re: How much would variable declarations in Ruby make you wi Marc Heiler wrote: > About the missing end's, over time I kinda developed a habit of > knowing where I made an error and can fix it up quickly. > It is not really that problematic for me. HOWEVER, I would actually > not mind some magical per-file way to omit end's based on > indent. :> I disagree, If you indent your code in the first place I find the missing 'end's pretty easy to pick up. If you indent 2 spaces, pass a block, backspace 2 and there is your end. I know it wouldn't be that easy on larger applications, but the same idea still stands IMO. This isn't Python. >> 1) Passing the wrong object as a parameter to a method. So why not spend a couple of lines testing the object first? >> 2) Accidentally creating a new variable. This can happen a lot no matter what language you code, I don't think setting up the equivilant to Perls 'strict' would be the way to go, in my opinion. But hey, I'm nothing but a humble Ruby programmer. :-) Regards, Lee -- Posted via http://www.ruby-forum.com/.