From e327cf09f6adbdedfa67196ac5c3a0634e24aedc Mon Sep 17 00:00:00 2001 From: Artem Darius Weber Date: Mon, 6 Jan 2025 11:00:40 +0300 Subject: [PATCH] refactor: freeze StudentShort instance after initialization --- lab2/student_short.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lab2/student_short.rb b/lab2/student_short.rb index e5d176b..4cc126b 100644 --- a/lab2/student_short.rb +++ b/lab2/student_short.rb @@ -6,6 +6,7 @@ class StudentShort < Person def initialize(id:, surname_initials:, phone: nil, telegram: nil, email: nil) super(id: id, phone: phone, telegram: telegram, email: email) @surname_initials = surname_initials + freeze end def self.from_student(student)