On Mon, 2003-11-24 at 02:04, T. Onoma wrote: > One of the annoyances that I frequently run into is the need to pull > variables from the current scope into the eval block. Obviosuly to do > this one has to pass eval a string wilth "#{x}" substituions in it, or > concatinations of strings, "..." + x + "...". In fact you HAVE to do > the later if the eval will have its only substitions. Ie. "..." + ' > "#{c}" ' + "...". But this also causes whole literals to be placed > into the evalutaion. Eg. > > a = [1,2,3] > eval "[#{a.join(',')}]" Hmm. Couldn't you just do: a = [ 1, 2, 3 ] eval "a" This works for me, unless I'm misunderstanding what you are referring to. Of course, this WON'T work if you specify a different binding to the eval...which is something I have run into myself. In that particular case, a way of "cutting holes" (as you said) to the current scope would indeed be useful. - Jamis