Actions
Feature #7363
closedRemove the global Pathname() method
Feature #7363:
Remove the global Pathname() method
Status:
Rejected
Assignee:
-
Target version:
-
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
Actions