Merged
Conversation
eef9372 to
786c93c
Compare
This case should continue to pass the Hash as a normal field init arg, and not interpret it as keyword-based init. See jruby#5448.
786c93c to
3985b81
Compare
eregon
pushed a commit
to ruby/spec
that referenced
this pull request
Nov 27, 2018
* Handle splatted and unsplatted kwarg Struct init the same. Fixes jruby/jruby#5448. * Init of non-kwarg Struct with splatted args containing Hash. This case should continue to pass the Hash as a normal field init arg, and not interpret it as keyword-based init. See jruby/jruby#5448.
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.
This includes a fix and spec for initializing a non-kwarg Struct with a splatted Hash-containing array of arguments, as in this snippit that reproduces #5448:
The Hash should not be interpreted to be keyword init of the Struct, since it is not a kwarg-initializable Struct. We simply weren't checking this flag on one path, and assuming a single Hash arg was always for kwarg init.