Project

General

Profile

Actions

Feature #7363

closed

Remove the global Pathname() method

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

Status:
Rejected
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 (zzak _), 11/19/2012 07:12 AM

Related issues 1 (0 open1 closed)

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0