Conversation
Contributor
Author
|
@yegor256 take a look please, happy to clarify anything about the change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fbe.same?read a property withfact.public_send(k), which gives back only its first value, so the.flattenaround it had nothing to do. When the query found a fact by aTimethat sat in the second or a later value,same?rejected it, andFbe.if_absentandFbe.just_onewent on to insert a duplicate.It now reads
fact[k.to_s], which is every value of the property, and checks the time against all of them. A time that is in none of the values is still refused.There was no test file for
same.rb, so this adds one, together with a test intest_if_absent.rband one intest_just_one.rbthat insert a fact with two times and make sure no second fact appears.Closes #1240