From: Nikodemus Siivola Date: 2002-10-17T06:36:02+09:00 Subject: Re: Precompiling eval expressions On Thu, 17 Oct 2002, Brian Candler wrote: > database (for example containing rules for validating fields or providing > default values); those rules may be used many times but only read in once. > Precompiling them also gives an opportunity to catch syntax errors before > they are actually used. Like this? code = "puts 'foo'" o = Object.new o.instance_eval "def bar;#{code};end" o.bar -- Nikodemus