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
I stumbled across this issue during specs where I named a property on the Context object display. The results were surprising and, after some code reading, it turns out it has to do with the way OpenStruct lazy-loads/queries properties.
As mentioned this problem is in using OpenStruct where the same behavior can be observed and it's all because there is already Object#display defined on Object.
Maybe something worth adding to the docs as a caveat?
The text was updated successfully, but these errors were encountered:
I stumbled across this issue during specs where I named a property on the
Context
objectdisplay
. The results were surprising and, after some code reading, it turns out it has to do with the wayOpenStruct
lazy-loads/queries properties.Sample class
Expected
Actual
As mentioned this problem is in using
OpenStruct
where the same behavior can be observed and it's all because there is already Object#display defined onObject
.Maybe something worth adding to the docs as a caveat?
The text was updated successfully, but these errors were encountered: