-
Notifications
You must be signed in to change notification settings - Fork 217
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
Add type for Enumerator::Chain
#2220
base: master
Are you sure you want to change the base?
Conversation
85363f5
to
3574120
Compare
3574120
to
eb2f558
Compare
Enumerator::Chain::new
Enumerator::Chain
core/enumerator.rbs
Outdated
@@ -612,19 +612,24 @@ end | |||
# | |||
# This type of objects can be created by Enumerable#chain and Enumerator#+. | |||
# | |||
class Enumerator::Chain[out Elem] < Enumerator[Elem, void] | |||
include Enumerable[Elem] | |||
class Enumerator::Chain[out Elem] < Enumerator[Elem, void] # Rubocop: `self` type is not allowed in this context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn’t it allowed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, rake annotate
deletes this comment.
# wrong argument type chain (expected enumerator) (TypeError) | ||
def with_index: (?Integer) ?{ (?) -> untyped } -> bot | ||
def each_with_index: () ?{ (?) -> untyped } -> bot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ruby bug?
CI:
Local: $ rake templates
/usr/local/bin/ruby templates/template.rb include/rbs/constants.h
/usr/local/bin/ruby templates/template.rb include/rbs/ruby_objs.h
/usr/local/bin/ruby templates/template.rb src/constants.c
/usr/local/bin/ruby templates/template.rb src/ruby_objs.c
$ git diff
$ echo $?
0 |
eb2f558
to
cfb8ed6
Compare
No description provided.