Restore 9.2 collect signature and add more API#7056
Merged
headius merged 1 commit intojruby:jruby-9.3from Mar 16, 2022
Merged
Conversation
This addresses an issue found by jruby-openssl where we altered the return value for a method in JRuby and broke backward compat with JRuby 9.2 and earlier. Specifically we unintentionally caused the RubyArray#collect(context, block) method to return IRubyObject instead of RubyArray due to needing to return an enumerator for some inputs. As a result of this change, jruby-openssl compiled against the new signature and became incompatible with JRuby 9.2. This fix does not address the issue for JRuby 9.3.0 through 9.3.3, which continue to have the bad signature. The restored signature will remain through 9.3 and 9.4 maintenance at least, with two new methods collectArray and collectEnum added to allow users to opt into those specific paths. The Ruby-facing method is renamed to rbCollect to indicate it is part of the Ruby interface for this class. See jruby/jruby-openssl#245
Member
Author
|
For 9.3.0 through 9.3.3 the only feasible migration path would be to use Note also that |
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 addresses an issue found by jruby-openssl where we altered
the return value for a method in JRuby and broke backward compat
with JRuby 9.2 and earlier. Specifically we unintentionally caused
the RubyArray#collect(context, block) method to return IRubyObject
instead of RubyArray due to needing to return an enumerator for
some inputs.
As a result of this change, jruby-openssl compiled against the new
signature and became incompatible with JRuby 9.2.
This fix does not address the issue for JRuby 9.3.0 through 9.3.3,
which continue to have the bad signature. The restored signature
will remain through 9.3 and 9.4 maintenance at least, with two new
methods collectArray and collectEnum added to allow users to opt
into those specific paths. The Ruby-facing method is renamed to
rbCollect to indicate it is part of the Ruby interface for this
class.
See jruby/jruby-openssl#245