Closed yykamei closed 3 days ago
@yykamei Thanks for your contribution!
Please follow the instructions below for each change. See also: https://github.com/ruby/gem_rbs_collection/blob/main/docs/CONTRIBUTING.md
You can use the following commands by commenting on this PR.
/merge
: Merge this PR if CI passesfaraday
You changed RBS files for an existing gem.
You can merge this PR yourself because you are a reviewer of this gem.
Just comment /merge
to merge this PR.
You can also request a review from other reviewers if you want.
Perhaps this change has something to do with it. https://github.com/ruby/rbs/pull/1774
Since rbs 3.5, initialize_copy
is automatically treated as private. (This mimics Ruby's behavior.)
Wow, thank you for sharing such great information. It makes sense to always make the methods , such as #initialize_copy
, private. From my perspective, there would be no problems proceeding with the pull request changes because Ruby, as well as RBS, treats #initialize_copy
as private. Am I correct?
Anyway, I appreciate your changes on RBS 👍
Yes, LGTM.
/merge
Faraday::Utils::Headers
inheritsHash
and override#initialize_copy
.Previously,
#initialize_copy
was called in the test file for Faraday to check the type signature, but I noticed the use of this method is marked as an error by Steep. I'm not sure why the current version of Steep reports it, but I decided to remove the declaration from the type signature because#initialize_copy
is in the first place a private method originally. In my opinion, it doesn't make sense to expose the signature of#initialize_copy
since it cannot be used without#send
.Here is an example code to confirm the method is private.
UPDATE:
As @ksss commented,
#initialize_copy
is always treated as private from this change. The RBS change is associated with the error report.