Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove TestArray#test_uniq_bang_with_freeze exclusion test case #5014

Merged
merged 1 commit into from
Jan 29, 2018

Conversation

nomadium
Copy link
Contributor

Hi folks,

I noticed one assertion in the excluded test TestArray#test_uniq_bang_with_freeze was failing because uniq_bang19 method in RubyArray class was not checking if the RubyArray instance can be modified after evaluating the passed block.

With this proposed change, if correct, the test should pass.

MRI does something similar.

They do a check at the beginning of the method [1] and other after checking if a block was given [2].

Thanks for your review and feedback.

  1. https://github.com/ruby/ruby/blob/trunk/array.c#L4447
  2. https://github.com/ruby/ruby/blob/trunk/array.c#L4459

@enebo enebo modified the milestones: JRuby 9.2.0.0, JRuby 9.1.16.0 Jan 29, 2018
@enebo enebo merged commit c7f5058 into jruby:master Jan 29, 2018
@enebo
Copy link
Member

enebo commented Jan 29, 2018

@nomadium This test is also on 9.1.x so I am cherry-picking this back. When possible when you notice these check jruby-9.1 branch first so it is a little easier for us (we regularly merge jruby-9.1 against master).

@nomadium
Copy link
Contributor Author

@enebo Cool, will do on the next ocassion.

@nomadium nomadium deleted the fix-array-test-uniq-bang-with-freeze branch January 31, 2018 20:09
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.

None yet

2 participants