https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17097754782018-10-06T15:31:52ZRuby Issue Tracking SystemRuby master - Bug #15206: require_relative in std_libhttps://bugs.ruby-lang.org/issues/15206?journal_id=743292018-10-06T15:31:52ZMSP-Greg (Greg L)
<ul></ul><p>The Appveyor run on the PR passed.</p>
<p>Appveyor testing has been intermittently failing. With parallel/multi testing (test-all and/or test-spec), there can be a lot more files being checked and possibly loaded. Considering more than one CI VM may be exist on a system, and they may share drives, anything that lowers disk I/O is good.</p> Ruby master - Bug #15206: require_relative in std_libhttps://bugs.ruby-lang.org/issues/15206?journal_id=743512018-10-09T00:23:31Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul><li><strong>Is duplicate of</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/8781">Feature #8781</a>: Use require_relative() instead of require() if possible</i> added</li></ul> Ruby master - Bug #15206: require_relative in std_libhttps://bugs.ruby-lang.org/issues/15206?journal_id=747292018-11-03T05:29:07Znobu (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 trunk|r65511.</p>
<hr>
<p>lib/cgi/util.rb: use require</p>
<ul>
<li>lib/cgi/util.rb: reverted r65505. require_relative does not<br>
work for cgi/escape.so, as extension libraries are placed in<br>
other directories than ruby libraries. [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: require_relative in std_lib (Closed)" href="https://bugs.ruby-lang.org/issues/15206">#15206</a>]</li>
</ul> Ruby master - Bug #15206: require_relative in std_libhttps://bugs.ruby-lang.org/issues/15206?journal_id=747442018-11-03T20:37:40Zstomar (Marcus Stollsteimer)
<ul></ul><p>For <code>lib/racc/parser.rb</code> I reverted this in r65514 for the require of <code>racc/cparse.so</code> (similar to r65511 for <code>cgi/escape</code>).</p>
<p>Possibly there might be other C extensions that are required from within <code>/lib</code>, where require_relative would not work?</p>
<p>(I only had a quick look into <code>/lib</code> and <code>/ext</code>, and <code>racc</code> was an obvious other case, besides <code>cgi</code>, where this problem might occur.)</p>
<p><em>PS. The LoadError for <code>racc/cparse</code> is not that obvious because it is rescued and there is a Ruby fallback.</em></p> Ruby master - Bug #15206: require_relative in std_libhttps://bugs.ruby-lang.org/issues/15206?journal_id=747702018-11-06T15:28:28Zmarcandre (Marc-Andre Lafortune)marcandre-ruby-core@marc-andre.ca
<ul></ul><p>Oh, good catch, I should have thought of that...</p>
<p>I modified my script to check if the path with .rb actually exists and it came back with only these two exceptions.</p> Ruby master - Bug #15206: require_relative in std_libhttps://bugs.ruby-lang.org/issues/15206?journal_id=747932018-11-07T12:06:25Zznz (Kazuhiro NISHIYAMA)
<ul></ul><p>I revert examples in comment and replace numeric features too at r65548.</p>