https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112021-01-19T21:52:39ZRuby Issue Tracking SystemRuby master - Bug #17563: FrozenError raised from Module#const_set when receiver is not frozenhttps://bugs.ruby-lang.org/issues/17563?journal_id=900222021-01-19T21:52:39Zryannevell (Ryan Nevell)ryan.nevell@gmail.com
<ul></ul><p>I've tried simply replacing <code>rb_ivar_set</code> with <code>ivar_set</code>, which skips the freeze check, but otherwise behaves the same. Since the instance variable <code>"__tmp_classpath__"</code> really looks like an internal property, modifying the frozen object to add this doesn't seem like it could do any harm.</p> Ruby master - Bug #17563: FrozenError raised from Module#const_set when receiver is not frozenhttps://bugs.ruby-lang.org/issues/17563?journal_id=900232021-01-19T21:59:41Zmarcandre (Marc-Andre Lafortune)marcandre-ruby-core@marc-andre.ca
<ul><li><strong>Assignee</strong> set to <i>jeremyevans0 (Jeremy Evans)</i></li></ul><p>Good bug hunting 👍</p>
<p>Your solution is sounds like the right one, I imagine <a class="user active user-mention" href="https://bugs.ruby-lang.org/users/1604">@jeremyevans0 (Jeremy Evans)</a> will confirm.</p> Ruby master - Bug #17563: FrozenError raised from Module#const_set when receiver is not frozenhttps://bugs.ruby-lang.org/issues/17563?journal_id=900242021-01-19T22:34:31Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<ul><li><strong>Assignee</strong> changed from <i>jeremyevans0 (Jeremy Evans)</i> to <i>nobu (Nobuyoshi Nakada)</i></li></ul><p>Using <code>ivar_set</code> seems reasonable to me, but I'd like to get @nobu's input as to whether this is acceptable.</p> Ruby master - Bug #17563: FrozenError raised from Module#const_set when receiver is not frozenhttps://bugs.ruby-lang.org/issues/17563?journal_id=900252021-01-19T23:36:37Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>I’m afraid if it’s safe when multi-ractor.</p> Ruby master - Bug #17563: FrozenError raised from Module#const_set when receiver is not frozenhttps://bugs.ruby-lang.org/issues/17563?journal_id=900302021-01-20T16:03:56Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Applied in changeset <a class="changeset" title="Skip freezing check on setting temporary class path [Bug #17563] Co-authored-by: ryannevell (Rya..." href="https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/565aeb81e0886c835888a425e5d05ed99fb03238">git|565aeb81e0886c835888a425e5d05ed99fb03238</a>.</p>
<hr>
<p>Skip freezing check on setting temporary class path [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: FrozenError raised from Module#const_set when receiver is not frozen (Closed)" href="https://bugs.ruby-lang.org/issues/17563">#17563</a>]</p>
<p>Co-authored-by: ryannevell (Ryan Nevell) <a href="mailto:ryan.nevell@gmail.com" class="email">ryan.nevell@gmail.com</a></p>