From: Rocky Bernstein Date: 2008-05-01T05:00:56+09:00 Subject: Re: [RCR] sandbox API ------=_Part_12465_22914176.1209585655779 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, 30 Apr 2008 14:32:22 +0900, _why wrote: > On Mon, Apr 28, 2008 at 10:06:05AM +0900, Tadashi Saito wrote: > > I think eval(string) is evil or too ugly and takes more time > > especially in 1.9. It should take block instead of it. > > The sandbox takes the "i" out of eval. A block would be nice, too, > except that I haven't figured out how to change the block's scope so > that it can't reference anything unsafe from its original habitat At the risk of promoting the idea of giving someone enough rope to hang him/herself, in Ruby 1.8 there's Kernel#binding_nfrom ruby_debug. ------=_Part_12465_22914176.1209585655779 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, 30 Apr 2008 14:32:22 +0900, _why <why@ruby-lang.org> wrote:
  On Mon, Apr 28, 2008 at 10:06:05AM +0900, Tadashi Saito wrote:
> I think eval(string) is <del>evil or</del> too ugly and takes more time
> especially in 1.9.  It should take block instead of it.

  The sandbox takes the "i" out of eval.  A block would be nice, too,
  except that I haven't figured out how to change the block's scope so
  that it can't reference anything unsafe from its original habitat

At the risk of promoting the idea of giving someone enough rope to hang him/herself, in Ruby 1.8 there's Kernel#binding_n from ruby_debug.

------=_Part_12465_22914176.1209585655779--