Release 0.2.0: override-by-default readers, mutable default fix, README and changelog polish#7
Merged
Release 0.2.0: override-by-default readers, mutable default fix, README and changelog polish#7
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.
Summary
This PR prepares and documents release 0.2.0 of
declarative_initialization.Behavior changes
fooconsistently returns the init-arg value. Previously it skipped defining the reader and warned; callers had to use@foo. This is a breaking change for code that relied on the old “skip and warn” behavior.Array,Hash,Set, andStringare now duplicated per instance when the caller omits that keyword (shallow copy). That prevents accidental cross-instance mutation when using defaults likeitems: []. Caller-provided values are not duplicated.Internal / UX
DeclarativeInitialization::Internalmodule (module functions only; no injection into user classes). Override warnings are optional: they run in Rails dev/test or when the logger level is DEBUG. No warning on Rails reload when the method was originally defined by the gem, and no warning when a subclass re-declares an attribute from a parent’sinitialize_with.