Open connorshea opened 4 years ago
In the case of StringIO
, self
is fine, but generally, it depends on what #each
returns.
It seems we have two options:
untyped
gives a correct type.nil
or self
make a runtime test fail, for the case implementation doesn't return them.I'm going to take option 2...
In Sorbet, T::Enumerator only has one argument (e.g.
T::Enumerator[String]
), but in ruby-signature it has 2.Right now, this is the input
And this is what
rbs prototype rbi
outputs:The rbs above causes this error when parsed:
I'm not 100% sure, but I think
T::Enumerator[String]
should be converted toEnumerator[String, self]
in ruby-signature?