From: Phlip Date: 2001-09-24T13:13:40+09:00 Subject: [ruby-talk:21618] Re: Please translate this easy snip of C++ to Ruby Dave Thomas wrote: > trace {"a+f"} Forgot about blocks going in, but... I figured that with 'eval' (and with some shenanigans to transport the scope), we'd have a solution that requires quotes. Doing it without quotes is more effort, but it pays. I've done it in python both ways. And about Carlos's recommendation to use The Preprocessor, the rules are you never use it unless you have exhausted every language technique. The python fix throws a private exception inside the 'trace', catches it, examines the stack dump, opens the file containing the calling code, reads the line by number, locates the 'trace', and reads what's inside the parens. No quotes required. In Ruby can we inspect the current call stack this easy? or maybe easier? -- Phlip http://www.greencheese.org/SonseOne