The prism parser (the only parser since v8.0.0) is strict about arguments to attr_reader, attr_writer, attr_accessor, and attr. It only parses as an attribute when all arguments are symbols.
As an example, the rdoc for Net::IMAP::Config intentionally took advantage of the looser parsing done by rdoc 7.2. Net::IMAP::Config defines its own versions of attr_reader, attr_writer and attr_accessor that add keyword arguments.
For example:
# Seconds to wait until a connection is opened.
#
# Applied separately for establishing TCP connection and starting a TLS
# connection.
#
# If the IMAP object cannot open a connection within this time,
# it raises a Net::OpenTimeout exception.
#
# See Net::IMAP.new and Net::IMAP#starttls.
#
# The default value is +30+ seconds.
attr_accessor :open_timeout, type: Integer, default: 30
rdoc 7.2 simply ignores the unknown keyword args, and parses this no differently from attr_accessor :open_timeout.
In my opinion, this is a bug in rdoc 8.0 which should be fixed.
The prism parser (the only parser since v8.0.0) is strict about arguments to
attr_reader,attr_writer,attr_accessor, andattr. It only parses as an attribute when all arguments are symbols.As an example, the rdoc for
Net::IMAP::Configintentionally took advantage of the looser parsing done by rdoc 7.2.Net::IMAP::Configdefines its own versions ofattr_reader,attr_writerandattr_accessorthat add keyword arguments.For example:
rdoc 7.2 simply ignores the unknown keyword args, and parses this no differently from
attr_accessor :open_timeout.In my opinion, this is a bug in rdoc 8.0 which should be fixed.