From: Tony Arcieri Date: 2010-10-19T07:47:03+09:00 Subject: Re: su {block of code.} --0016363b9ee25d04ba0492ebf451 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Oct 18, 2010 at 4:18 PM, Guido De Rosa wrote: > Tony Arcieri wrote in post #955183: > > I'd suggest spawning a new Ruby instance which runs under sudo and > > talking > > to it with DRb > > My big concern comes directly from DRb doc: > > "As blocks (or rather the Proc objects that represent them) are not > marshallable, the block executes in the local, not the remote, context." > That's not an issue here. They're describing how blocks execute in the local context. Here we specifically want a block to run in the scop of the remote object. You could obtain an object over DRb and instance eval the block in the scope of the DRb object. Any methods executed would be called on the DRb object. -- Tony Arcieri Medioh! A Kudelski Brand --0016363b9ee25d04ba0492ebf451--