https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112012-05-19T08:56:46ZRuby Issue Tracking SystemRuby master - Bug #6454: Anonymous classes should delete tmp_classpath on duphttps://redmine.ruby-lang.org/issues/6454?journal_id=267112012-05-19T08:56:46Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>File</strong> <a href="/attachments/2698">rb_mod_init_copy.bug6454.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2698/rb_mod_init_copy.bug6454.patch">rb_mod_init_copy.bug6454.patch</a> added</li></ul><p>This patch fixes the name of dup'd anonymous classes (and modules).</p> Ruby master - Bug #6454: Anonymous classes should delete tmp_classpath on duphttps://redmine.ruby-lang.org/issues/6454?journal_id=267412012-05-21T20:20:47Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>matz (Yukihiro Matsumoto)</i></li></ul><p>Aaron, you'd better think we are really lazy :-)<br>
It would be good not only to attach a demonstration patch but also<br>
to write the demonstration in the mail.</p>
<p>x = Class.new<br>
y = x.dup<br>
p x #=> #<a href="Class:0x9a96ce0" class="external">Class:0x9a96ce0</a><br>
p y #=> #<a href="Class:0x9a96cb8" class="external">Class:0x9a96cb8</a> # they are different as expected,</p>
<p>x = Class.new<br>
x.inspect # but if #inspect is called before #dup,<br>
y = x.dup<br>
p x #=> #<a href="Class:0x9113c7c" class="external">Class:0x9113c7c</a><br>
p y #=> #<a href="Class:0x9113c7c" class="external">Class:0x9113c7c</a> # they become same.</p>
<p>I give +1 to drbrain's patch.</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a></p> Ruby master - Bug #6454: Anonymous classes should delete tmp_classpath on duphttps://redmine.ruby-lang.org/issues/6454?journal_id=267492012-05-22T00:53:18ZAnonymous
<ul><li><strong>File</strong> <a href="/attachments/2705">noname</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2705/noname">noname</a> added</li></ul><p>On Mon, May 21, 2012 at 08:20:48PM +0900, mame (Yusuke Endoh) wrote:</p>
<blockquote>
<p>Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Anonymous classes should delete tmp_classpath on dup (Closed)" href="https://redmine.ruby-lang.org/issues/6454">#6454</a> has been updated by mame (Yusuke Endoh).</p>
<p>Status changed from Open to Assigned<br>
Assignee set to matz (Yukihiro Matsumoto)</p>
<p>Aaron, you'd better think we are really lazy :-)</p>
</blockquote>
<p>Haha! Sorry about that. I am also <em>really</em> lazy!</p>
<blockquote>
<p>It would be good not only to attach a demonstration patch but also<br>
to write the demonstration in the mail.</p>
</blockquote>
<p>I will try to be less lazy next time. :-)</p>
<p>--<br>
Aaron Patterson<br>
<a href="http://tenderlovemaking.com/" class="external">http://tenderlovemaking.com/</a></p> Ruby master - Bug #6454: Anonymous classes should delete tmp_classpath on duphttps://redmine.ruby-lang.org/issues/6454?journal_id=267542012-05-22T09:13:09Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul><li><strong>Assignee</strong> changed from <i>matz (Yukihiro Matsumoto)</i> to <i>drbrain (Eric Hodel)</i></li></ul><p>Commit the patch.</p>
<p>Matz.</p> Ruby master - Bug #6454: Anonymous classes should delete tmp_classpath on duphttps://redmine.ruby-lang.org/issues/6454?journal_id=267692012-05-23T05:15:30Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r35759.<br>
Aaron, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>class.c (rb_mod_init_copy): Clear the cached inspect string of a<br>
dup'd anonymous module or class. [ruby-trunk - Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Anonymous classes should delete tmp_classpath on dup (Closed)" href="https://redmine.ruby-lang.org/issues/6454">#6454</a>]</li>
<li>test/ruby/test_module.rb (class TestModule): ditto</li>
</ul>