From: Caleb Clausen Date: 2009-05-13T02:00:17+09:00 Subject: Re: Any current preprocessor/Ruby language add-ons? On 5/12/09, C. Dagnon wrote: > This is kind of a wide-ranging question but for some fairly specific > purposes. > > I'm curious what project people are working on with respect to the Ruby > language, compiler, or any preprocessors. Specifically I want to use > file- or project-wide directives (as in VB where new variables require > explicit declarations), and I want to add preconditions, postconditions, > type checking, side effects, and tests/behaviour assertions within the > code files along with associated automated analysis. You may want to look at RubyMacros, a preprocessor I wrote to add syntax tree based macros to ruby. I've got a simple assert macro in my examples; maybe that helps you... http://www.rubyforge.org/projects/rubymacros http://github.org/coatl/rubymacros There have been a number of efforts to add static typing (-ish) features to ruby. The most recent is Diamondback Ruby; an announcement for it was posted here a couple weeks ago. It has some kind of method annotation special comment for declaring types of arguments, like you wanted.