On Wed, Jun 9, 2010 at 8:45 AM, lalawawa <usenet / ccjj.info> wrote: > In perl, one is able to sort of 'declare' variables by mentioning them > in 'my' statements. =A0Then, if you say 'use strict;', no variables that > weren't previously thus 'declared' are allowed. =A0This is useful in that > it catches typos that might be difficult to detect in testing. > > Does ruby have an equivalent mechanism? > Well one can say, that concerning local variables the "my" is implicit. Instance variables spring into life without "declaration". In Ruby 1.9 this gives you a warning though. HTH R. --=20 The best way to predict the future is to invent it. -- Alan Kay