Robert Klemme wrote: > > "Andreas Schwarz" <usenet / andreas-s.net> schrieb im Newsbeitrag > news:4129dc1a$0$6639$9b4e6d93 / newsread4.arcor-online.net... >> Graham Nicholls wrote: >> > Apologies if its a FAQ, but is there a way I can check my syntax for > errors >> > that would otherwise only appear at runtime? You know the sort of > thing: >> > >> > some code >> > rescue => err >> > exit (LOGIC_ERR) >> > >> > end >> > >> > which when run fails because LOGIC_ERR is undefined >> >> This is no syntax error, and it can only be detected at runtime. > > Exactly! > > For completeness reasons: syntax can be checked by doing "ruby -c". > > Kind regards > > robert OK, so its not a syntax error. Pedants :-) There ought to be a utility to look for variable references, etc. Now, I realize that this may be hard as its presumably akin to part of writing a compile. What I'd like to know, then is how to avoid the above - its a real nuisance in "scripting languages" (Oh and if you don't like that term, get over it - you know what I mean, python, perl(ugh!) Ruby & the like) Ta. Graham -- The answer's always "Yes". Now, what's the question?