From: Tim Hunter Date: 2003-11-17T10:25:54+09:00 Subject: Re: macros On Wed, 12 Nov 2003 03:58:43 +0900, Josef 'Jupp' SCHUGT wrote: > > You can (ab)use the C preprocessor in the following manner: > > $ cat trick_rb.c > > #define sniplet(a) ("/Path/To/" + a + "/Directory") > puts sniplet('some') > > $ gcc -E trick_rb.c > trick.rb > $ cat trick.rb > # 1 "trick_rb.c" > > puts ("/Path/To/" + 'some' + "/Directory") > > $ ruby trick.rb > > /Path/To/some/Directory > If you're going to go _that_ route, why not use M4?