Actions
Misc #15249
openDocumentation for attr_accessor and attr_reader should be corrected
Status:
Open
Assignee:
-
Description
The documentation for Module#attr_accessor (v2.5.1) begins, "Defines a named attribute for this module, where the name is symbol.id2name, creating an instance variable (@name) and...". Similarly, the documentation for Module#attr_reader states, "Creates instance variables and...". These statements do not appear to be correct:
class C
attr_accessor :dog
attr_reader :cat
end
C.new.instance_variables #=> []
No data to display
Actions
Like0