https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2019-05-24T23:02:26Z
Ruby Issue Tracking System
Ruby master - Bug #15875: const_defined? behavior inconsistency in 2.6.x series
https://bugs.ruby-lang.org/issues/15875?journal_id=78211
2019-05-24T23:02:26Z
matsuda (Akira Matsuda)
ronnie@dio.jp
<ul></ul><a name="Side-Note-1"></a>
<h3 >Side Note #1<a href="#Side-Note-1" class="wiki-anchor">¶</a></h3>
<p><code>const_get()</code> could get this constant for all released versions, but has been intentionally changed in 2.7. Correct?</p>
<pre><code>% ruby -e "module A; end; B = 1; p Object.const_get('A::B')"
[1.9.3...2.6.3]
1
[2.7.0-dev (2019-05-25 trunk 559dca509d)]
Traceback (most recent call last):
1: from -e:1:in `<main>'
-e:1:in `const_get': uninitialized constant A::B (NameError)
</code></pre>
<a name="Side-Note-2"></a>
<h3 >Side Note #2<a href="#Side-Note-2" class="wiki-anchor">¶</a></h3>
<p>Current stable jruby seems to be following the 2.6 behavior.</p>
<pre><code>% ruby -e "module A; end; B = 1; p Object.const_defined?('A::B')"
[jruby-9.2.7.0]
true
</code></pre>
Ruby master - Bug #15875: const_defined? behavior inconsistency in 2.6.x series
https://bugs.ruby-lang.org/issues/15875?journal_id=78218
2019-05-25T03:40:36Z
jeremyevans0 (Jeremy Evans)
merch-redmine@jeremyevans.net
<ul></ul><p>Bisected to <a class="changeset" title="merge revision(s) 66938: [Backport #15488] Fix `Module#const_defined?` on inherited cons..." href="https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/bf8cc37b467e1d372e1b01b4d25e9ef6f8cc927f">bf8cc37b467e1d372e1b01b4d25e9ef6f8cc927f</a>.</p>
<p>Backporting <a class="changeset" title="object.c: fix searching nested const paths * object.c (rb_mod_const_get, rb_mod_const_defined): ..." href="https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/d10451f3fd51f577e704db770de48d05044eb45c">d10451f3fd51f577e704db770de48d05044eb45c</a> to 2.6 fixes this bug.</p>
Ruby master - Bug #15875: const_defined? behavior inconsistency in 2.6.x series
https://bugs.ruby-lang.org/issues/15875?journal_id=78219
2019-05-25T04:50:12Z
nobu (Nobuyoshi Nakada)
nobu@ruby-lang.org
<ul><li><strong>Is duplicate of</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/15758">Bug #15758</a>: Object.const_defined?(name) falsely returns true on classes that are not defined</i> added</li></ul>
Ruby master - Bug #15875: const_defined? behavior inconsistency in 2.6.x series
https://bugs.ruby-lang.org/issues/15875?journal_id=78238
2019-05-27T03:27:17Z
nagachika (Tomoyuki Chikanaga)
nagachika00@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>Backport</strong> changed from <i>2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN</i> to <i>2.4: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED</i></li></ul>
Ruby master - Bug #15875: const_defined? behavior inconsistency in 2.6.x series
https://bugs.ruby-lang.org/issues/15875?journal_id=83037
2019-12-09T12:07:11Z
nagachika (Tomoyuki Chikanaga)
nagachika00@gmail.com
<ul><li><strong>Backport</strong> changed from <i>2.4: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED</i> to <i>2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONE</i></li></ul><p>ruby_2_6 r67830 merged revision(s) e1b592b508c72a56ae012869d97fe1580ff87246,d10451f3fd51f577e704db770de48d05044eb45c.</p>