Skip to content

Always be private - #1774

Merged
soutaro merged 1 commit into
ruby:masterfrom
ksss:always-be-private
Mar 26, 2024
Merged

soutaro merged 1 commit into
ruby:masterfrom
ksss:always-be-private

Conversation

@ksss

@ksss ksss commented Mar 25, 2024

Copy link
Copy Markdown
Collaborator

Instance methods of #initialize, #initialize_copy, #initialize_clone, #initialize_dup and #respond_to_missing? are always private in CRuby.

https://github.com/ruby/ruby/blob/69579ed57a2aa1c3ad739417db70564d570bf2c1/vm_method.c#L966-L977

I think it would be difficult to always mandate this behavior in the RBS signature, so I suggest that it be automatically set to private.

Instance methods of initialize, initialize_copy, initialize_clone, initialize_dup
and respond_to_missing? are always be private in CRuby.

@soutaro soutaro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! 👍

@soutaro soutaro added this to the RBS 3.5 milestone Mar 26, 2024
@soutaro
soutaro added this pull request to the merge queue Mar 26, 2024
Merged via the queue into ruby:master with commit 7084d83 Mar 26, 2024
@ksss
ksss deleted the always-be-private branch March 26, 2024 01:30
@soutaro soutaro added the Released PRs already included in the released version label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Released PRs already included in the released version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants