------ art_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 <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<http://bashdb.sourceforge.net/ruby-debug.html#SEC78>from ruby_debug. ------ art_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 <<a href ailto:why / ruby-lang.org">why / ruby-lang.org</a>> wrote:<br><div class mail_quote"><blockquote class mail_quote" styleorder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> On Mon, Apr 28, 2008 at 10:06:05AM +0900, Tadashi Saito wrote:<br> > I think eval(string) is <del>evil or</del> too ugly and takes more time<br> > especially in 1.9. It should take block instead of it.<br> <br> The sandbox takes the "i" out of eval. A block would be nice, too,<br> except that I haven't figured out how to change the block's scope so<br> that it can't reference anything unsafe from its original habitat</blockquote><div><br>At the risk of promoting the idea of giving someone enough rope to hang him/herself, in Ruby 1.8 there's <a href ttp://bashdb.sourceforge.net/ruby-debug.html#SEC78">Kernel#binding_n</a> from ruby_debug.<br> </div></div><br> ------ art_12465_22914176.1209585655779--