From: David Garamond Date: 2002-05-04T16:17:59+09:00 Subject: Re: restricted execution Matt Armstrong wrote: >>python has rexec and perl similarly has the Safe module. how does >>one do restricted execution in ruby? > > > Ruby has the $SAFE variable which can be set to integers 0 thru 4 -- > the higher the number the more things are restricted. > > It is like Perl's taint mode but with multiple levels of safety. > > There is nothing like Perl's Safe module where individual "opcodes" > can be turned on and off. I'm not sure what Python's rexec provides. thanks for the info. but i'm having difficulty finding documentation about $SAFE. any url will be appreciated. btw, i just did some googling and found a thread on 'sandboxing in ruby'. is is still the case that there is no library to do sandboxing? i believe the capability to restrict the execution of untrusted in-process code is very useful for several apps, especially distributed objects or mobile code (e.g. in grail (graphical browser written in python) which executes python applets, or in zope which executes dtml, etc). -- dave