Project

General

Profile

Feature #7363

Remove the global Pathname() method

Added by aef (Alexander E. Fischer) over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:49377]

Description

About a year ago I sumbitted an not yet accepted patch for Ruby on GitHub which deprecates the global Pathname() method and adds the .[] operator to the Pathname class. The patch got ignored, supposedly because I didn't post it here.

https://github.com/ruby/ruby/pull/61

I think poisoning the global namespace with methods named after classes should be considered bad style. Instead, all related methods should lie below the Class' namespace. I hope you share that opinion.

As some User once suggested that probably only collection type classes (e.g. Set) should have a .[] operator, I'm no longer proposing to add .[] instead to Pathname.

If you like the idea, please let me know. I will modify the patch then.


Files

7363.patch (1.67 KB) 7363.patch zzak (Zachary Scott), 11/19/2012 07:12 AM

Related issues

Related to Ruby master - Feature #7378: Adding Pathname#writeClosedakr (Akira Tanaka)06/02/2012Actions

Also available in: Atom PDF