You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Direct accessor methods are only created if the attribute name is a valid method name.
By default, a specific error is raised for names that don't fit the criteria.
Option to skip accessor creation is available.
My environment
Affects my production application: NO
Ruby version: 2.6.6, 2.7.3
The text was updated successfully, but these errors were encountered:
Describe the bug
Dry::Struct::ClassInterface#define_accessors naively consumes attribute value in eval block.
If the name contains a single space, second word becomes a parameter.
If argument contains special symbols,
SyntaxError
is raised.To Reproduce
Expected behavior
Direct accessor methods are only created if the attribute name is a valid method name.
By default, a specific error is raised for names that don't fit the criteria.
Option to skip accessor creation is available.
My environment
The text was updated successfully, but these errors were encountered: