rbs
rbs copied to clipboard
Fix special methods accessibility.
I have fixed the problem regarding visibility of special methods.
Background
Special methods are default private instance methods in ruby.
#initialize#initialize_copy#initialize_dup#initialize_clone#respond_to_missing?
Problem
String#initialize_copy is public method in RBS
$ bundle exec rbs method String initialize_copy
::String#initialize_copy
defined_in: ::String
implementation: ::String
accessibility: public
String#initialize_copy expected to be private method.
public def initialize_copy is private method in RBS
class Foo
public def initialize_copy: (self) -> self
end
$ bundle exec rbs method Foo initialize_copy
::Foo#initialize_copy
defined_in: ::Foo
implementation: ::Foo
accessibility: private
If it has a public modifier, it expected to be a public method.