Skip to content

#1400: avoid mutating time inputs - #1447

Open
gemshrine wants to merge 2 commits into
zerocracy:masterfrom
gemshrine:1400
Open

gemshrine wants to merge 2 commits into
zerocracy:masterfrom
gemshrine:1400

Conversation

@gemshrine

Copy link
Copy Markdown
Contributor

Fixes #1400.

Time#utc changes the receiver's UTC offset. FBE used it while formatting values in if_absent, just_one, and GitHub Graph queries, so serializing a caller's time could change that same object.

These paths now use Time#getutc, which formats a UTC copy. Regression tests check that the original offsets survive calls to both Factbase helpers and the Graph query methods.

Coverage is in test/fbe/test_if_absent.rb, test/fbe/test_just_one.rb, and test/fbe/test_github_graph.rb. CI runs the project checks.

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.

FBE UTC formatting mutates caller-owned Time values

1 participant