Accept Symbol property names in Fbe.overwrite - #1327
Open
Titanism0v0 wants to merge 1 commit into
Open
Titanism0v0 wants to merge 1 commit into
Titanism0v0 wants to merge 1 commit into
Conversation
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.
Closes #1243.
The single-property form of
Fbe.overwriterejected a Symbol property name before reading or writing the fact, while its Hash form accepts Symbol keys. This change converts a Symbol name to a String before the existing String check. String inputs retain their behavior, and unsupported names such as Integer and nil retain their existing errors.Validation:
Fbe::Erroron the unmodified code.bundle _2.5.16_ exec ruby -Itest test/fbe/test_overwrite.rb -- --no-covpassed (37 tests, 92 assertions); the non-String/non-Symbol compatibility test passed (1 test, 4 assertions).bundle _2.5.16_ exec rubocop lib/fbe/overwrite.rb test/fbe/test_overwrite.rbpassed (2 files, no offenses);bundle _2.5.16_ exec rake yardpassed.bundle _2.5.16_ exec rakeremains red on both zero-patch and changed snapshots. Both reproduce the existing fake PR judges-action#193: add compare to Fbe::FakeOctokit #95 fixture mismatch, the root-only unwritable-directory test, and the award fixture returning 5 instead of 4. The changed snapshot reports 603 tests, 1637 assertions, 2 failures, 1 error, and 9 skips. The recorded baseline run reports 600 tests, 1627 assertions, 3 failures, 1 error, and 9 skips; its third failure was a one-offTestConsider#test_processes_fact_when_slot_fits_the_timeouttiming failure.rake picksand full RuboCop also retain their separately confirmed baseline failures.