https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?14253458252012-11-16T04:53:18ZRuby Issue Tracking SystemRuby trunk - 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&#39;t see <br>
the the real problem with it being named after a class. However, I don&#39;t <br>
think it&#39;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&#39;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&#39;t see why we shouldn&#39;t have said method. <br>
It could even alias to ::glob as Dir[] does; that would give some <br>
consistency (though I wouldn&#39;t mind if we&#39;d continue not to have ::[]).</p>
<p>P.S.: If I replied wrong in any way, please let me know, as I couldn&#39;t <br>
find a guide on how to reply to issues (if it&#39;s any different than <br>
replying like in a &quot;regular&quot; mailing list). Thanks!</p>
Ruby trunk - Feature #7363: Remove the global Pathname() methodhttps://bugs.ruby-lang.org/issues/7363?journal_id=330022012-11-17T10:20:09ZEric Hodeldrbrain@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 trunk - Feature #7363: Remove the global Pathname() methodhttps://bugs.ruby-lang.org/issues/7363?journal_id=330662012-11-19T07:12:58ZZachary Scotte@zzak.io
<ul><li><strong>File</strong> <a href="/attachments/download/3258/7363.patch">7363.patch</a><a href="/attachments/3258/7363.patch"><img alt="Magnifier" src="/images/magnifier.png?1425345825" /></a> added</li></ul><p>Adding patch from github.</p>
Ruby trunk - Feature #7363: Remove the global Pathname() methodhttps://bugs.ruby-lang.org/issues/7363?journal_id=337282012-11-24T10:58:38ZYusuke Endohmame@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>
<h2></h2>
<p>Yusuke Endoh <a href="mailto:mame@tsg.ne.jp">mame@tsg.ne.jp</a></p>