https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112012-11-05T11:57:27ZRuby Issue Tracking SystemRuby master - Bug #7271: Refinement doesn't seem lexicalhttps://redmine.ruby-lang.org/issues/7271?journal_id=323592012-11-05T11:57:27Zshugo (Shugo Maeda)
<ul></ul><p>ko1 (Koichi Sasada) wrote:</p>
<blockquote>
<p>C_User#y is refined. Is that intentional?</p>
</blockquote>
<p>Yes, it's intentional. Refinements are activated when C_User is reopend.</p>
<p>I'm not sure whether is'a good idea or not, but if C_User.module_eval is affected by refinements, it seems natural reopened definitions of C_User are also affected.</p> Ruby master - Bug #7271: Refinement doesn't seem lexicalhttps://redmine.ruby-lang.org/issues/7271?journal_id=323792012-11-05T15:59:15Zko1 (Koichi Sasada)
<ul></ul><p>(2012/11/05 11:57), shugo (Shugo Maeda) wrote:</p>
<blockquote>
<p>Yes, it's intentional. Refinements are activated when C_User is reopend.</p>
<p>I'm not sure whether is'a good idea or not, but if C_User.module_eval is affected by refinements, it seems natural reopened definitions of C_User are also affected.</p>
</blockquote>
<p>I can't understand that refinement is "lexical" or not.</p>
<p>If it affected after re-open, then it is <em>not</em> "lexical".<br>
If the location of `using' affect the result, then it seems "lexical".<br>
(<a href="/issues/7269">[ruby-core:48773]</a> [ruby-trunk - Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Refinement doesn't work if using locate after method (Closed)" href="https://redmine.ruby-lang.org/issues/7269">#7269</a>])</p>
<p>--<br>
// SASADA Koichi at atdot dot net</p> Ruby master - Bug #7271: Refinement doesn't seem lexicalhttps://redmine.ruby-lang.org/issues/7271?journal_id=323822012-11-05T16:38:24Zshugo (Shugo Maeda)
<ul></ul><p>ko1 (Koichi Sasada) wrote:</p>
<blockquote>
<p>(2012/11/05 11:57), shugo (Shugo Maeda) wrote:</p>
<blockquote>
<p>Yes, it's intentional. Refinements are activated when C_User is reopend.</p>
<p>I'm not sure whether is'a good idea or not, but if C_User.module_eval is affected by refinements, it seems natural reopened definitions of C_User are also affected.</p>
</blockquote>
<p>I can't understand that refinement is "lexical" or not.</p>
<p>If it affected after re-open, then it is <em>not</em> "lexical".<br>
If the location of `using' affect the result, then it seems "lexical".<br>
(<a href="/issues/7269">[ruby-core:48773]</a> [ruby-trunk - Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Refinement doesn't work if using locate after method (Closed)" href="https://redmine.ruby-lang.org/issues/7269">#7269</a>])</p>
</blockquote>
<p>I may have confused you by the word lexical, but I used the word lexical in the sense that refinements have no local rebinding. I'm not sure whether refinements should be literally lexical or not.</p>
<p>I guess if refinements are literally lexical it's good for performance, but how module_eval (or an alternative to apply refinements to a given block) should behave?</p> Ruby master - Bug #7271: Refinement doesn't seem lexicalhttps://redmine.ruby-lang.org/issues/7271?journal_id=346912012-12-13T14:25:33Zshugo (Shugo Maeda)
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>Refinements are not activated by reopen now, so I close this ticket.</p>