------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 &lt;<a hrefailto:why / ruby-lang.org">why / ruby-lang.org</a>&gt; wrote:<br><div classmail_quote"><blockquote classmail_quote" styleorder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&nbsp;
On Mon, Apr 28, 2008 at 10:06:05AM +0900, Tadashi Saito wrote:<br>
&gt; I think eval(string) is &lt;del&gt;evil or&lt;/del&gt; too ugly and takes more time<br>
&gt; especially in 1.9. &nbsp;It should take block instead of it.<br>
<br>&nbsp;
The sandbox takes the &quot;i&quot; out of eval. &nbsp;A block would be nice, too,<br>&nbsp;
except that I haven&#39;t figured out how to change the block&#39;s scope so<br>&nbsp;
that it can&#39;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&#39;s <a hrefttp://bashdb.sourceforge.net/ruby-debug.html#SEC78">Kernel#binding_n</a> from ruby_debug.<br>
</div></div><br>

------art_12465_22914176.1209585655779--