In #[] and #[]= we check against a list of known options and raise an exception for unknown options. We assumed that OpenStruct#method_missing would use these methods, but it doesn't. It accesses the data directly. We should either stop using OpenStruct so that we can implement our checks, or we should discard the checks.
The majority of people never experienced the checks, and nobody complained and asked for checks to be added yet, so the use of the checks is questionable at best.
If we do fix the checks, we need to make sure that KnownOptions is correct for all configs. At least :mode for the bot's configuration is missing.
In
#[]
and#[]=
we check against a list of known options and raise an exception for unknown options. We assumed thatOpenStruct#method_missing
would use these methods, but it doesn't. It accesses the data directly. We should either stop using OpenStruct so that we can implement our checks, or we should discard the checks.The majority of people never experienced the checks, and nobody complained and asked for checks to be added yet, so the use of the checks is questionable at best.
If we do fix the checks, we need to make sure that KnownOptions is correct for all configs. At least
:mode
for the bot's configuration is missing.