https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112016-11-14T04:58:53ZRuby Issue Tracking SystemRuby master - Feature #12931: Add support for Binding#instance_evalhttps://bugs.ruby-lang.org/issues/12931?journal_id=614802016-11-14T04:58:53Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/61480/diff?detail_id=43072">diff</a>)</li></ul><p>Since local variables and constants depend on the context, it won't be able to be "cached," as a <code>Proc</code> compiled other place.<br>
So I think it isn't worth.</p> Ruby master - Feature #12931: Add support for Binding#instance_evalhttps://bugs.ruby-lang.org/issues/12931?journal_id=615062016-11-15T05:55:28Zioquatix (Samuel Williams)samuel@oriontransfer.net
<ul></ul><p>Nobuyoshi Nakada wrote:</p>
<blockquote>
<p>Since local variables and constants depend on the context, it won't be able to be "cached," as a <code>Proc</code> compiled other place.<br>
So I think it isn't worth.</p>
</blockquote>
<p>That makes sense.</p>
<p>So, to clarify, you are saying that there is no way to reuse the compiled proc? It would need to be recompiled?</p>
<p>From my POV, I guess the benefit of this is duck typing.</p>
<p>If performance was the same of eval, it would be acceptable, but if there is some way it could be better, that would be awesome.</p> Ruby master - Feature #12931: Add support for Binding#instance_evalhttps://bugs.ruby-lang.org/issues/12931?journal_id=625582017-01-19T07:21:01Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>Correct, there is no way to reuse the compiled proc.</p> Ruby master - Feature #12931: Add support for Binding#instance_evalhttps://bugs.ruby-lang.org/issues/12931?journal_id=625592017-01-19T07:22:05Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul>