Skip to content

Conversation

@tk0miya
Copy link
Contributor

@tk0miya tk0miya commented Sep 4, 2024

The Enumerator::Chain#chain type expects an instance of Enumerator::Chain[Elem] as its argument. As a result, the nested #chain calls requires Enumerator::Chain object.

It should accept enumerable objects instead of the same kind of object (self).

refs: #1988

The `Enumerator::Chain#chain` type expects an instance of
`Enumerator::Chain[Elem]` as its argument.  As a result, the
nested `#chain` calls requires `Enumerator::Chain` object.

It should accept enumerable objects instead of the same kind of
object (self).

refs: ruby#1988
@tk0miya
Copy link
Contributor Author

tk0miya commented Sep 4, 2024

I did not update the test code because I'm not sure what it's doing.
https://github.com/ruby/rbs/blob/master/test/stdlib/Enumerable_test.rb#L57-L60

Co-authored-by: ParadoxV5 <paradox.ver5@gmail.com>
Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@soutaro soutaro added this pull request to the merge queue Sep 13, 2024
Merged via the queue into ruby:master with commit cb22de4 Sep 13, 2024
@tk0miya tk0miya deleted the fix_enumerable_chain branch September 13, 2024 14:07
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.

3 participants