Enumerable#any?, all?, none? and one? now accept a pattern argument #5096
This is another change adding Ruby 2.5 support : Enumerable#any?, all?, none? and one? now accept a pattern argument (feature #11286 ).
All associated MRI and ruby/spec tests
Thanks for your review and feedback.
All Enumerable tests in ruby-2.5 branch should work with this PR.
I still would like to research and understand why that specific test was failing when each with a block built with JavaInternalBlockBody class is passed but not with one built with BlockCallback.
Replace each call + JavaInternalBlockBody with callEach + BlockCallback as is implemented Enumerable#all? as well. The failed test was: https://github.com/jruby/jruby/blob/3813f0a53c22af8122e8c2b70c7d87ae35323109/spec/ruby/core/enumerable/any_spec.rb#L214