
Issue #19261 has been updated by k0kubun (Takashi Kokubun). If we were to remove this from Data instances, I'd like Struct instances to not have that method either. Let's say you replace Struct.new with Data.define for something that's already immutable, I don't want that change to break anything. But `Data` randomly lacking some shorthand methods that exist for Struct would make such refactoring dangerous. ---------------------------------------- Feature #19261: `Data#members` is not important https://bugs.ruby-lang.org/issues/19261#change-101149 * Author: ko1 (Koichi Sasada) * Status: Open * Priority: Normal ---------------------------------------- `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. ```ruby 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) -- https://bugs.ruby-lang.org/