[Bug #20087] [DOC] Uninitialized instance variable is not warned now

This commit is contained in:
Nobuyoshi Nakada 2023-12-27 01:10:30 +09:00
Родитель 550a49c913
Коммит c452fe17ac
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 3582D74E1FEE4465
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -162,9 +162,7 @@ Here is an example of instance variable usage:
p object1.value # prints "some value"
p object2.value # prints "other value"
An uninitialized instance variable has a value of +nil+. If you run Ruby with
warnings enabled, you will get a warning when accessing an uninitialized
instance variable.
An uninitialized instance variable has a value of +nil+.
The +value+ method has access to the value set by the +initialize+ method, but
only for the same object.