Skip to content
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

[Ruby 3.0] Reserved for numparams #4323

Merged
merged 4 commits into from Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion gems/sorbet/lib/serialize.rb
Expand Up @@ -333,7 +333,7 @@ def from_method(method)
if (!KEYWORDS.include?(arg_name.to_sym)) && method.name.to_s.end_with?('=') && arg_name =~ /\A[a-z_][a-z0-9A-Z_]*\Z/ && index == 0
name = arg_name
else
name = '_' + (uniq == 0 ? '' : uniq.to_s)
name = 'arg' + (uniq == 0 ? '' : uniq.to_s)
uniq += 1
end
end
Expand Down
34 changes: 17 additions & 17 deletions gems/sorbet/test/hidden-method-finder/shims.rb.source
Expand Up @@ -94,7 +94,7 @@ class Socket < BasicSocket
end

class BasicSocket < IO
def read_nonblock(*_); end
def read_nonblock(*arg0); end
end

Errno::EAUTH = Errno::NOERROR
Expand Down Expand Up @@ -123,7 +123,7 @@ Errno::EQFULL = Errno::ELAST
Errno::ESHLIBVERS = Errno::NOERROR

class IPSocket < BasicSocket
def self.getaddress_orig(*_); end
def self.getaddress_orig(*arg0); end
end

module Process
Expand Down Expand Up @@ -409,7 +409,7 @@ class Etc::Passwd
end

class IO
def nonblock(*_); end
def nonblock(*arg0); end
def nonblock=(nonblock); end
def nonblock?(); end
end
Expand Down Expand Up @@ -461,30 +461,30 @@ class Gem::Security::KEY_ALGORITHM
def dmp1(); end
def dmq1(); end
def e(); end
def export(*_); end
def self.generate(*_); end
def initialize(*_); end
def export(*arg0); end
def self.generate(*arg0); end
def initialize(*arg0); end
def iqmp(); end
def n(); end
def p(); end
def params(); end
def private?(); end
def private_decrypt(*_); end
def private_encrypt(*_); end
def private_decrypt(*arg0); end
def private_encrypt(*arg0); end
def public?(); end
def public_decrypt(*_); end
def public_encrypt(*_); end
def public_decrypt(*arg0); end
def public_encrypt(*arg0); end
def public_key(); end
def q(); end
def set_crt_params(_, _1, _2); end
def set_factors(_, _1); end
def set_key(_, _1, _2); end
def sign_pss(*_); end
def set_crt_params(arg0, arg1, arg2); end
def set_factors(arg0, arg1); end
def set_key(arg0, arg1, arg2); end
def sign_pss(*arg0); end
def to_der(); end
def to_pem(*_); end
def to_s(*_); end
def to_pem(*arg0); end
def to_s(*arg0); end
def to_text(); end
def verify_pss(*_); end
def verify_pss(*arg0); end
NO_PADDING = nil
PKCS1_OAEP_PADDING = nil
PKCS1_PADDING = nil
Expand Down
Expand Up @@ -15,7 +15,7 @@ class Array
end

class Array
def self.try_convert(_); end
def self.try_convert(arg); end
end

BasicObject::BasicObject = BasicObject
Expand Down Expand Up @@ -137,7 +137,7 @@ class Bundler::Fetcher::CompactIndex::ClientFetcher
end

class Bundler::Fetcher::CompactIndex::ClientFetcher
def self.[](*_); end
def self.[](*arg); end

def self.members(); end
end
Expand Down Expand Up @@ -442,7 +442,7 @@ module Bundler::Plugin::API::Source

def dependency_names=(dependency_names); end

def double_check_for(*_); end
def double_check_for(*arg); end

def eql?(other); end

Expand Down Expand Up @@ -981,11 +981,11 @@ module Bundler::Thor::Base::ClassMethods

def arguments(); end

def attr_accessor(*_); end
def attr_accessor(*arg); end

def attr_reader(*_); end
def attr_reader(*arg); end

def attr_writer(*_); end
def attr_writer(*arg); end

def baseclass(); end

Expand Down Expand Up @@ -1215,9 +1215,9 @@ class Bundler::Thor::Group

def self.invoke_from_option(*names, &block); end

def self.printable_commands(*_); end
def self.printable_commands(*arg); end

def self.printable_tasks(*_); end
def self.printable_tasks(*arg); end

def self.remove_invocation(*names); end

Expand Down Expand Up @@ -1522,7 +1522,7 @@ class Bundler::Thor::Shell::Basic

def say_status(status, message, log_status=T.unsafe(nil)); end

def set_color(string, *_); end
def set_color(string, *arg); end

def show_diff(destination, content); end

Expand Down Expand Up @@ -1834,7 +1834,7 @@ class Bundler::VersionRanges::NEq
end

class Bundler::VersionRanges::NEq
def self.[](*_); end
def self.[](*arg); end

def self.members(); end
end
Expand Down Expand Up @@ -1869,13 +1869,13 @@ class Bundler::VersionRanges::ReqR::Endpoint
end

class Bundler::VersionRanges::ReqR::Endpoint
def self.[](*_); end
def self.[](*arg); end

def self.members(); end
end

class Bundler::VersionRanges::ReqR
def self.[](*_); end
def self.[](*arg); end

def self.members(); end
end
Expand Down Expand Up @@ -1965,7 +1965,7 @@ end
class DidYouMean::NullChecker
def corrections(); end

def initialize(*_); end
def initialize(*arg); end
end

class DidYouMean::PlainFormatter
Expand Down Expand Up @@ -2005,7 +2005,7 @@ class Dir
end

class Dir
def self.exists?(_); end
def self.exists?(arg); end
end

class ERB
Expand All @@ -2015,23 +2015,23 @@ class ERB
end

class Encoding
def _dump(*_); end
def _dump(*arg); end
end

class Encoding::Converter
def initialize(*_); end
def initialize(*arg); end
end

class Encoding
def self._load(_); end
def self._load(arg); end
end

module Enumerable
def sum(*_); end
def sum(*arg); end
end

class Enumerator
def +(_); end
def +(arg); end

def each_with_index(); end
end
Expand All @@ -2045,7 +2045,7 @@ class Enumerator::ArithmeticSequence

def exclude_end?(); end

def last(*_); end
def last(*arg); end

def step(); end
end
Expand All @@ -2060,9 +2060,9 @@ class Enumerator::Chain
end

class Enumerator::Generator
def each(*_, &blk); end
def each(*arg, &blk); end

def initialize(*_); end
def initialize(*arg); end
end

Errno::ECAPMODE = Errno::NOERROR
Expand Down Expand Up @@ -2093,7 +2093,7 @@ end

class Etc::Group
extend ::Enumerable
def self.[](*_); end
def self.[](*arg); end

def self.each(&blk); end

Expand All @@ -2120,7 +2120,7 @@ end

class Etc::Passwd
extend ::Enumerable
def self.[](*_); end
def self.[](*arg); end

def self.each(&blk); end

Expand All @@ -2138,7 +2138,7 @@ class FalseClass
end

class File
def self.exists?(_); end
def self.exists?(arg); end
end

module FileUtils
Expand Down Expand Up @@ -2197,7 +2197,7 @@ class Foo
end

module GC
def garbage_collect(*_); end
def garbage_collect(*arg); end
end

module GC
Expand Down Expand Up @@ -2745,21 +2745,21 @@ class Hash
end

class Hash
def self.try_convert(_); end
def self.try_convert(arg); end
end

class IO
def nread(); end

def pathconf(_); end
def pathconf(arg); end

def ready?(); end

def wait(*_); end
def wait(*arg); end

def wait_readable(*_); end
def wait_readable(*arg); end

def wait_writable(*_); end
def wait_writable(*arg); end
end

IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable
Expand All @@ -2777,11 +2777,11 @@ class Integer
end

class JSON::Ext::Generator::State
def self.from_state(_); end
def self.from_state(arg); end
end

class JSON::Ext::Parser
def initialize(*_); end
def initialize(*arg); end
end

JSON::Parser = JSON::Ext::Parser
Expand Down Expand Up @@ -2856,27 +2856,27 @@ class Object
end

class Pathname
def fnmatch?(*_); end
def fnmatch?(*arg); end

def glob(*_); end
def glob(*arg); end

def make_symlink(_); end
def make_symlink(arg); end
end

class Proc
def <<(_); end
def <<(arg); end

def >>(_); end
def >>(arg); end

def clone(); end
end

class Random
def self.bytes(_); end
def self.bytes(arg); end
end

class Range
def %(_); end
def %(arg); end

def entries(); end

Expand All @@ -2897,13 +2897,13 @@ end
module RubyVM::MJIT
def self.enabled?(); end

def self.pause(*_); end
def self.pause(*arg); end

def self.resume(); end
end

class RubyVM
def self.resolve_feature_path(_); end
def self.resolve_feature_path(arg); end
end

class Set
Expand Down Expand Up @@ -2961,7 +2961,7 @@ class String
end

class Struct
def filter(*_); end
def filter(*arg); end
end

Struct::Group = Etc::Group
Expand All @@ -2971,7 +2971,7 @@ Struct::Passwd = Etc::Passwd
Struct::Tms = Process::Tms

class TracePoint
def __enable(_, _1); end
def __enable(arg, arg1); end

def eval_script(); end

Expand Down