The GeShi Filter module provides a filter for source code syntax highlighting for a wide range of languages.
Source code can be entered with for example ... or .... Automatically adding line numbers is possible too with for example [ruby linenumbers="normal"].