lib/rbs/ast/members.rb in rbs-1.0.4 vs lib/rbs/ast/members.rb in rbs-1.0.5

- old
+ new

@@ -243,9 +243,22 @@ alias eql? == def hash self.class.hash ^ name.hash ^ type.hash ^ ivar_name.hash ^ kind.hash end + + def update(name: self.name, type: self.type, ivar_name: self.ivar_name, kind: self.kind, annotations: self.annotations, location: self.location, comment: self.comment) + klass = _ = self.class + klass.new( + name: name, + type: type, + ivar_name: ivar_name, + kind: kind, + annotations: annotations, + location: location, + comment: comment + ) + end end class AttrReader < Base include Attribute