https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112011-06-26T14:59:28ZRuby Issue Tracking SystemRuby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=182922011-06-26T14:59:28Znaruse (Yui NARUSE)naruse@airemix.jp
<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><li><strong>Target version</strong> set to <i>1.9.3</i></li></ul> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=186572011-06-29T13:41:40Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>the patch should be applied before 1.9.3.</p>
<p>matz.</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=186582011-06-29T13:55:04Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>Sorry, this issue must be covered by <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Inconsistent behaviour of Module#const_get with included modules (Closed)" href="https://bugs.ruby-lang.org/issues/3423">#3423</a>.</p>
<p>matz.</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=186602011-06-29T14:20:38Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<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 r32283.<br>
Magnus, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>variable.c (rb_const_get_0): should not look for superclasses if<br>
the second optional argument is given for #const_get().<br>
fix [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Object.const_get(:A, false) can access BasicObject::A (Closed)" href="https://bugs.ruby-lang.org/issues/3422">#3422</a>] [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Inconsistent behaviour of Module#const_get with included modules (Closed)" href="https://bugs.ruby-lang.org/issues/3423">#3423</a>]</li>
</ul> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=187102011-07-01T03:36:06Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Assigned</i></li><li><strong>Priority</strong> changed from <i>3</i> to <i>Normal</i></li></ul><p>r32283 breaks following codes:</p>
<p>module LangModuleSpecInObject<br>
module LangModuleTop<br>
end<br>
end<br>
include LangModuleSpecInObject<br>
module LangModuleTop<br>
end #=> NameError: uninitialized constant LangModuleTop</p>
<p>class BasicObject<br>
end #=> NameError: uninitialized constant BasicObject</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=187112011-07-01T03:37:58Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>Yui NARUSE wrote:</p>
<blockquote>
<p>r32283 breaks following codes:</p>
</blockquote>
<p>Oops, r32342 fix this. thanks!</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=187142011-07-01T05:29:05Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Assigned</i></li></ul><p>Following code still doesn't work:</p>
<p>module LangModuleSpecInObject<br>
module LangModuleTop<br>
end<br>
end<br>
include LangModuleSpecInObject<br>
p LangModuleTop<br>
end<br>
p LangModuleSpecInObject::LangModuleTop == LangModuleTop #=> false (it should be true)</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=187202011-07-01T07:49:01Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>Can you elaborate?</p>
<p>If I remove "end" in the line 7, it works for me (otherwise, it was an syntax error).</p>
<p>matz.</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=187222011-07-01T08:28:56Znaruse (Yui NARUSE)naruse@airemix.jp
<ul></ul><p>Oh sorry, it must be:</p>
<p>module LangModuleSpecInObject<br>
module LangModuleTop<br>
end<br>
end<br>
include LangModuleSpecInObject<br>
module LangModuleTop<br>
end<br>
p LangModuleSpecInObject::LangModuleTop == LangModuleTop</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=190212011-07-10T15:18:56Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul></ul><blockquote>
<p>Oh sorry, it must be:</p>
<p>module LangModuleSpecInObject<br>
module LangModuleTop<br>
end<br>
end<br>
include LangModuleSpecInObject<br>
module LangModuleTop<br>
end<br>
p LangModuleSpecInObject::LangModuleTop == LangModuleTop</p>
</blockquote>
<p>matz, could you please answer to Yui?</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=203372011-08-20T19:02:51Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul></ul><p>Matz, I think we need to decide either 1) revert r32283 or 2) fix naruse reported regression. Everybody know you are busy. But I believe 1.9.3 have no regression.....</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=205472011-09-03T11:57:07Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=205562011-09-04T00:23:07Zjudofyr (Magnus Holm)judofyr@gmail.com
<ul></ul><p>On Sat, Sep 3, 2011 at 04:57, Nobuyoshi Nakada <a href="mailto:nobu@ruby-lang.org" class="email">nobu@ruby-lang.org</a> wrote:</p>
<blockquote>
<p>Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Object.const_get(:A, false) can access BasicObject::A (Closed)" href="https://bugs.ruby-lang.org/issues/3422">#3422</a> has been updated by Nobuyoshi Nakada.</p>
<p>Status changed from Assigned to Closed</p>
</blockquote>
<p>Why is this issue closed? Is the current behaviour acceptable?</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=205722011-09-05T00:53:09Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul><li><strong>ruby -v</strong> changed from <i>ruby 1.9.2dev (2010-05-31 revision 28117) [x86_64-darwin10.3.0]</i> to <i>-</i></li></ul><blockquote>
<p>Why is this issue closed? Is the current behaviour acceptable?</p>
</blockquote>
<p>Can you still reproduce this issue?</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=205842011-09-06T00:23:07Zjudofyr (Magnus Holm)judofyr@gmail.com
<ul></ul><blockquote>
<blockquote>
<p>Why is this issue closed? Is the current behaviour acceptable?</p>
</blockquote>
<p>Can you still reproduce this issue?</p>
</blockquote>
<p>Not the original issue. But it seemed to me that this issue was left<br>
open because it introduced other problems (discussed above). Now that<br>
this one has closed, I'm wondering what happened to this new issue?</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=205852011-09-06T01:03:48Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>ruby -v</strong> changed from <i>-</i> to <i>ruby 1.9.2dev (2010-05-31 revision 28117) [x86_64-darwin10.3.0]</i></li></ul><p>nobu lazily closed this ticket without the revision reference: r33163.</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=205922011-09-06T07:53:07Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul><li><strong>ruby -v</strong> changed from <i>ruby 1.9.2dev (2010-05-31 revision 28117) [x86_64-darwin10.3.0]</i> to <i>-</i></li></ul><blockquote>
<blockquote>
<blockquote>
<p>Why is this issue closed? Is the current behaviour acceptable?</p>
</blockquote>
<p>Can you still reproduce this issue?</p>
</blockquote>
<p>Not the original issue. But it seemed to me that this issue was left<br>
open because it introduced other problems (discussed above). Now that<br>
this one has closed, I'm wondering what happened to this new issue?</p>
</blockquote>
<p>As Yui explained, nobu fixed and commited it into ruby_1_9_3 branch. so<br>
I'm not thinking the regression above discussed disappeared. If you run<br>
latest ruby_1_9_3 branch and find any issue, please let us know asap.</p>
<p>Thank you for paying attention our bugfixes effort.</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=314742012-10-25T04:53:11Zaef (Alexander E. Fischer)aef@raxys.net
<ul></ul><p>Could the following problem be related to this change? "Including namespace module through RSpec config in Ruby 1.9.3":<a href="http://stackoverflow.com/questions/13042298/including-namespace-module-through-rspec-config-in-ruby-1-9-3" class="external">http://stackoverflow.com/questions/13042298/including-namespace-module-through-rspec-config-in-ruby-1-9-3</a></p>
<p>If so, wouldn't it be a better idea to revert this?</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=314752012-10-25T08:03:26Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Open</i></li></ul> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=345652012-12-10T00:45:41Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Target version</strong> changed from <i>1.9.3</i> to <i>2.0.0</i></li></ul><p>Matz, do you think that it should be changed again?<br>
IMO, in principle, I don't think that it is a good idea to change the behavior so many times.</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a></p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=352982013-01-09T14:58:41Zshugo (Shugo Maeda)
<ul><li><strong>Assignee</strong> changed from <i>matz (Yukihiro Matsumoto)</i> to <i>kosaki (Motohiro KOSAKI)</i></li></ul><p>mame (Yusuke Endoh) wrote:</p>
<blockquote>
<p>Matz, do you think that it should be changed again?<br>
IMO, in principle, I don't think that it is a good idea to change the behavior so many times.</p>
</blockquote>
<p>I'm not sure why this ticket has been reopened, but if it's because of the following comment, this ticket can be closed, because the request has already been rejected in <a class="issue tracker-1 status-6 priority-4 priority-default closed" title="Bug: Namespace regression problem in RSpec from 1.9.2 to 1.9.3 (Rejected)" href="https://bugs.ruby-lang.org/issues/7213">#7213</a>.</p>
<blockquote>
<p>Could the following problem be related to this change? "Including namespace module through RSpec config in Ruby 1.9.3":<a href="http://stackoverflow.com/questions/13042298/including-namespace-module-through-rspec-config-in-ruby-1-9-3" class="external">http://stackoverflow.com/questions/13042298/including-namespace-module-through-rspec-config-in-ruby-1-9-3</a></p>
<p>If so, wouldn't it be a better idea to revert this?</p>
</blockquote>
<p>Kosaki-san, why did you reopen this ticket?</p> Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::Ahttps://bugs.ruby-lang.org/issues/3422?journal_id=353082013-01-10T09:34:06Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><blockquote>
<p>Kosaki-san, why did you reopen this ticket?</p>
</blockquote>
<p>Sorry, my memory was lost and I don't remember why. but I suspect your guess is right and we can close this ticket.</p>