From: Stefan Matthias Aust Date: 2001-05-01T03:40:14+09:00 Subject: [ruby-talk:14448] How to do it the Ruby-way 2 Hi again, I really like the way I can embed ruby code in strings using #{}. This code works as expected: def a(name) print "<#{a.capitalize}>" end but what if the pattern string isn't a constant but also provided with that method, let's say: def a(pat, name) print pat end This doesn't work anymore (of course). Now, my solution is this: def a(pat, name) eval "print \"#{pat}\"" end But, I think, it's really ugly. I'd like to use a pattern string read in from an external file (from the trusted source) and then emit it using all bindings currently available in that method. How can this be achieved? bye -- Stefan Matthias Aust \/ Truth Until Paradox