From: Chris Morris Date: 2002-06-04T10:37:21+09:00 Subject: RE: Declaring variables? > number = 3 > numbr += 1 # a typo > puts number # prints 3, but should have printed 4 > > Is there a way to protect myself from typos on lvalue variable names? Well, literally in that case, you'd get this error: irb(main):001:0> numbr += 1 NameError: undefined method `+' for nil from (irb):1 Now, if numbr had been used previously, you'd still have your original issue -- there's no declaring of variables (like VB's Option Explicit) to protect you. One Best Practice that seems to cover nicely for this sort of thing is unit testing. The benefits of unit testing go beyond preventing simple mistakes like this one. It is sort of a non-answer to your question, but I've rarely run into problems with the dynamic typing and declaration-free attributes of Ruby with unit testing. Chris