Project

General

Profile

Actions

Feature #19261

open

`Data#members` is not important

Added by ko1 (Koichi Sasada) almost 2 years ago. Updated almost 2 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:111434]

Description

Data#members is defined but it is calculated by self.class.members (in other words, #members is a shorthand for self.class.members).
So it is better to remove this method.

P = Data.define(:x, :y)
p P.new(1, 2).members #=> [:x, :y]

Group = Data.define(:name, :members)
gs = Group.new('SasadaFamily', %w(ko1 yuki))
p gs.members #=> ["ko1", "yuki"]

Files

data-members-remove-method.patch (1.87 KB) data-members-remove-method.patch fabiormoura (Fabio Moura Maia), 01/08/2023 06:18 PM
data-and-struct-remove-members-method.patch (3.5 KB) data-and-struct-remove-members-method.patch fabiormoura (Fabio Moura Maia), 01/10/2023 01:22 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0