Skip to content

Convernt question mark in instance variables#7

Open
m-jarmula wants to merge 1 commit intoonthebeach:masterfrom
m-jarmula:bugfix/protect-instance-variable-from-question-marks
Open

Convernt question mark in instance variables#7
m-jarmula wants to merge 1 commit intoonthebeach:masterfrom
m-jarmula:bugfix/protect-instance-variable-from-question-marks

Conversation

@m-jarmula
Copy link
Copy Markdown

@m-jarmula m-jarmula commented Oct 5, 2018

Problem: We create instance variable based on keys passed in constructor. Ruby doesn't allow to have question mark in the instance variable name.
Solution:
This PR will check if the last character of the ivar_name is ? if so it will replace it with _question_mark.
Current workaround is to make a regular field and set a key for this field, but this approach breaks code convention, besides that the gems by default returns hash structure with question mark.
Warnings
We use this feature as a concern to gain some memory performance

@m-jarmula m-jarmula force-pushed the bugfix/protect-instance-variable-from-question-marks branch 2 times, most recently from f24964b to b9ad34f Compare October 5, 2018 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant