From: David Unric Date: 2010-11-10T07:56:05+09:00 Subject: Re: Analyzer for errors in code ? Ryan Davis> Yep, I really understand it's impossible to do static (lexical) code analysis in case of a programming language with dynamic type system and selfmodifying abilities at the runtime you can 100% rely on. I would just appreciate some helper tool to warn me about _possible_ dumb typing errors I will make at writing my code and I would decide if it's false or positive warning. Most of time I'm fixing typos rather then a mistake in an algorithm. Better then nothing. Unfortunately none of above mentioned or linked tools detected the use of unassigned variable. For an illustration what does pylint for the equivalent code in python: _____ snip ________________________________________ import sys if __name__ == "__main__": my_msg = 'Hello' if sys.argv[-1] == 'doit': print mymsg else: print 'Nope' ~$ pylint -E test.py No config file found, using default configuration ************* Module test E: 6: Undefined variable 'mymsg' _____ snip ________________________________________ I'm using the new generation of Ruby, version 1.9.2 concretely. It produduces bytecode for YARV interpreter. I'm sure catching an intermediate output between parsed source and bytecode would allow static analysis I'm calling for. Is this possible with current versions Ruby ? -- Posted via http://www.ruby-forum.com/.