Project

General

Profile

Actions

Feature #6737

closed

Add Hash#read and alias as #[].

Added by trans (Thomas Sawyer) almost 12 years ago. Updated over 6 years ago.

Status:
Feedback
Assignee:
-
Target version:
-
[ruby-core:46492]

Description

Just, generally speaking it is nice to have a word named method for things when that suites readability better. Most operators (outside of numerical math, of course) have word equivalents. I actually hope you will accept this request based on this merit alone.

But more specifically this is also related to #6442, "CRUDifying" Hash's design. Adding #read is essentially the first step in doing this. Since #read, being the "R" in CRUD, would be one of the core methods, its preferable to have word-named method to go along with other methods, #store (for create and update) and #delete to act as that foundation.

Obviously there is nothing earth shattering here, just asking for an alias at this point. I'd like to incrementally submit requests/patches to "CRUDify" Hash rather then submit one huge patch as it will be much easier to test and ensure backward compatibility that way.


Files

hash.patch (842 Bytes) hash.patch trans (Thomas Sawyer), 11/06/2012 06:42 AM

Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #6442: CRUDify Hash classFeedbacktrans (Thomas Sawyer)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0