Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StatementCache bug workaround #30

Merged
merged 2 commits into from
Jan 5, 2024

Conversation

evman182
Copy link
Collaborator

@evman182 evman182 commented Jan 4, 2024

No description provided.

@evman182 evman182 requested a review from bkroeker January 4, 2024 18:51
Copy link
Owner

@bkroeker bkroeker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof. Weird bug.

Approved, with a code style suggestion. Also, coming up with good witchy names instead of P1 and P2 wouldn't go amiss in following thematic styling. 😉

Comment on lines 138 to 146
person1 = Person.create name: 'P1'
wart1 = Wart.create person: person1
currentPerson1 = wart1.history.at(Time.current).first.person

person2 = Person.create name: 'P2'
wart2 = Wart.create person: person2
currentPerson2 = wart2.history.at(Time.current).first.person

expect(currentPerson2.name).to eq('P2')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some non-rubyesque variable naming snuck in.

Suggested change
person1 = Person.create name: 'P1'
wart1 = Wart.create person: person1
currentPerson1 = wart1.history.at(Time.current).first.person
person2 = Person.create name: 'P2'
wart2 = Wart.create person: person2
currentPerson2 = wart2.history.at(Time.current).first.person
expect(currentPerson2.name).to eq('P2')
person1 = Person.create name: 'P1'
wart1 = Wart.create person: person1
current_person1 = wart1.history.at(Time.current).first.person
person2 = Person.create name: 'P2'
wart2 = Wart.create person: person2
current_person2 = wart2.history.at(Time.current).first.person
expect(current_person2.name).to eq('P2')

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a C# developer at heart. I'll rename everything. Gonna also get rubocop running as part of CI soon

@bkroeker bkroeker self-requested a review January 4, 2024 19:56
@evman182 evman182 merged commit 73db6ca into bkroeker:master Jan 5, 2024
18 checks passed
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.

2 participants