Skip to content

Struct#values should return an array which is independent of the struct#5375

Merged
kares merged 1 commit intojruby:masterfrom
nomadium:fix-5372-struct-issue
Oct 19, 2018
Merged

Struct#values should return an array which is independent of the struct#5375
kares merged 1 commit intojruby:masterfrom
nomadium:fix-5372-struct-issue

Conversation

@nomadium
Copy link
Contributor

@nomadium nomadium commented Oct 18, 2018

Struct#to_a and Struct#values should return an Array which is independent to the Struct. So subsequent modifications to the struct should not be visible in a previously retrieved values array. In MRI a new Array is created at each call to #values or #to_a.

Fixes #5372.

@kares kares added this to the JRuby 9.2.1.0 milestone Oct 19, 2018
@kares kares merged commit d67173f into jruby:master Oct 19, 2018
@nomadium nomadium deleted the fix-5372-struct-issue branch November 25, 2018 16:11
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.

2 participants