https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112012-11-16T04:53:18ZRuby Issue Tracking SystemRuby master - Feature #7363: Remove the global Pathname() methodhttps://bugs.ruby-lang.org/issues/7363?journal_id=329382012-11-16T04:53:18ZAnonymous
<ul></ul><p>Hi,</p>
<p>First off: +1 on your request about the Pathname(). Although I don't see<br>
the the real problem with it being named after a class. However, I don't<br>
think it's necessary to have a shortcut which is four characters shorter<br>
than the thing it shortens (afaict it is a shorthand of Pathname.new -<br>
does it really hurt to write those four characters?). Also, another<br>
problem I see with it is that it doesn't conform with the usual method<br>
naming scheme.</p>
<p>Secondly, I regard Pathname as a collection - in the exact same way I<br>
regard Dir as a collection; a collection of path names that is. And I<br>
think others do too. So I don't see why we shouldn't have said method.<br>
It could even alias to ::glob as Dir[] does; that would give some<br>
consistency (though I wouldn't mind if we'd continue not to have ::[]).</p>
<p>P.S.: If I replied wrong in any way, please let me know, as I couldn't<br>
find a guide on how to reply to issues (if it's any different than<br>
replying like in a "regular" mailing list). Thanks!</p> Ruby master - Feature #7363: Remove the global Pathname() methodhttps://bugs.ruby-lang.org/issues/7363?journal_id=330022012-11-17T10:20:09Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>=begin<br>
(({Pathname()})) matches (({Integer()})), (({Array()})), (({URI()})), etc. I would prefer to keep (({Pathname()})) in the tradition of these other methods.<br>
=end</p> Ruby master - Feature #7363: Remove the global Pathname() methodhttps://bugs.ruby-lang.org/issues/7363?journal_id=330662012-11-19T07:12:58Zzzak (zzak _)
<ul><li><strong>File</strong> <a href="/attachments/3258">7363.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3258/7363.patch">7363.patch</a> added</li></ul><p>Adding patch from github.</p> Ruby master - Feature #7363: Remove the global Pathname() methodhttps://bugs.ruby-lang.org/issues/7363?journal_id=337282012-11-24T10:58:38Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>As drbrain said, this is the convention in Ruby. There is no reason to hate only Pathname.<br>
Because of compatibility, it is impossible to remove all methods that is named after the corresponding class, i.e., Integer, Array, etc.</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a></p>