From: "Brian Schröder" Date: 2005-12-08T00:56:20+09:00 Subject: Re: Syntax checker? On 07/12/05, William E. Rubin wrote: > Ruby doesn't seem to check for class names, function names, and so > forth until it actually hits a line that tries to use such a thing. Is > there a way to get it to check up front, without having to run the > script through every possible line of code? > > I understand that this is not strictly "syntax" checking, and that Ruby > does actually do a "syntax" check. So I mean some other term, more > along the lines of what a traditional compiler will do (minus the > actual compilation). > > > That is actually impossible, as the system can not determine which functions exists at any given line without executing the previous lines. E.g. def method_missing(name, *args, &block) return name if args.length == 0 super(name, *args, &block) end foo() bar(foo()) cheers, Brian -- http://ruby.brian-schroeder.de/ Stringed instrument chords: http://chordlist.brian-schroeder.de/