From: ara.t.howard@... Date: 2007-02-23T04:56:26+09:00 Subject: Re: Restore Kernel.binding to a previous state On Fri, 23 Feb 2007, Hans Sjunnesson wrote: >> Ben > > Helpful - yes, in finding out that using eval might not be what I'm > after. > I thought, at first, that a binding housed the entirety of a running > ruby process' context. > > I'm wanting to run ruby snippets like the below: > > require 'rake' > default = task :default do > # do stuff > end > default.invoke > > But for my problem, I might be better off using Kernel::system, and > invoking ruby in an external process, even though I'd really like my > little code-snippet to be able to access, for instance, the Logger > I've set up in my queue-system. > I might get away with that by modifying your BindingFactory to pass > objects into the created binding as local variables. But stuff like > rake modify the running context in more ways than setting local > variables. > > why don't you fork? -a -- be kind whenever possible... it is always possible. - the dalai lama