https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112018-10-30T10:07:52ZRuby Issue Tracking SystemRuby master - Feature #15230: RubyVM.resolve_feature_pathhttps://redmine.ruby-lang.org/issues/15230?journal_id=746722018-10-30T10:07:52ZEregon (Benoit Daloze)
<ul></ul><p>What's the leading one letter Symbol in the return value?<br>
That seems fairly cryptic.</p>
<p>Do you need it? I would expect such a method to return a path, i.e., a String.</p> Ruby master - Feature #15230: RubyVM.resolve_feature_pathhttps://redmine.ruby-lang.org/issues/15230?journal_id=746762018-10-30T14:00:37Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul></ul><p><code>:r</code> means <code>.rb</code> and <code>:s</code> means <code>.so</code>, I guess :-)</p>
<p>It is not absolutely necessary. But it would be somewhat useful for a static analysis tool of Ruby programs because such a tool typically needs to skip <code>.so</code> files.</p> Ruby master - Feature #15230: RubyVM.resolve_feature_pathhttps://redmine.ruby-lang.org/issues/15230?journal_id=746772018-10-30T14:18:27ZEregon (Benoit Daloze)
<ul></ul><p>If it's reliable enough (I think it is) to detect native extensions by the file extension (.so, .dylib)<br>
then I think that should be preferred as it would simplify the method's result.</p> Ruby master - Feature #15230: RubyVM.resolve_feature_pathhttps://redmine.ruby-lang.org/issues/15230?journal_id=746932018-10-31T01:12:43Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<ul></ul><p>mame (Yusuke Endoh) wrote:</p>
<blockquote>
<p><code>:r</code> means <code>.rb</code> and <code>:s</code> means <code>.so</code>, I guess :-)</p>
</blockquote>
<p>If this information is kept, please make it easier to understand. :rb/:so or :'.rb'/:'.so' at a minimum.</p> Ruby master - Feature #15230: RubyVM.resolve_feature_pathhttps://redmine.ruby-lang.org/issues/15230?journal_id=754472018-12-06T06:40:58Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>Applied in changeset trunk|r66237.</p>
<hr>
<p>load.c (RubyVM.resolve_feature_path): New method. [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: RubyVM.resolve_feature_path (Closed)" href="https://redmine.ruby-lang.org/issues/15230">#15230</a>]</p> Ruby master - Feature #15230: RubyVM.resolve_feature_pathhttps://redmine.ruby-lang.org/issues/15230?journal_id=754492018-12-06T08:37:27Zznz (Kazuhiro NISHIYAMA)
<ul></ul><p>It returns false as path when feature is already loaded.<br>
Is it intentional?</p>
<pre><code>% rbenv exec irb --simple-prompt -r irb/completion
>> RubyVM.resolve_feature_path('set')
=> [:rb, false]
</code></pre> Ruby master - Feature #15230: RubyVM.resolve_feature_pathhttps://redmine.ruby-lang.org/issues/15230?journal_id=783602019-06-05T20:05:33ZEregon (Benoit Daloze)
<ul></ul><p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/18">@mame (Yusuke Endoh)</a> should the behavior that <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/14">@znz (Kazuhiro NISHIYAMA)</a> reports be fixed?<br>
<code>resolve_feature_path</code> sounds like it should always resolve a feature, no matter if the feature is loaded or not.</p> Ruby master - Feature #15230: RubyVM.resolve_feature_pathhttps://redmine.ruby-lang.org/issues/15230?journal_id=783612019-06-05T20:14:04ZEregon (Benoit Daloze)
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/15903">Feature #15903</a>: Move RubyVM.resolve_feature_path to Kernel.resolve_feature_path</i> added</li></ul> Ruby master - Feature #15230: RubyVM.resolve_feature_pathhttps://redmine.ruby-lang.org/issues/15230?journal_id=783682019-06-05T22:57:20Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul></ul><p>Eregon (Benoit Daloze) wrote:</p>
<blockquote>
<p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/18">@mame (Yusuke Endoh)</a> should the behavior that <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/14">@znz (Kazuhiro NISHIYAMA)</a> reports be fixed?</p>
</blockquote>
<p>I hear <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/4">@nobu (Nobuyoshi Nakada)</a> has already fixed the issue. (Thanks!)</p> Ruby master - Feature #15230: RubyVM.resolve_feature_pathhttps://redmine.ruby-lang.org/issues/15230?journal_id=783812019-06-06T09:28:52ZEregon (Benoit Daloze)
<ul></ul><p>Great!</p>