Skip to content

Commit

Permalink
Revert "[Ruby 3.0] Reserved for numparams (#4323)" (#4337)
Browse files Browse the repository at this point in the history
This reverts commit 2b3a6c0.
  • Loading branch information
elliottt committed Jul 8, 2021
1 parent 2b3a6c0 commit f2f50a0
Show file tree
Hide file tree
Showing 45 changed files with 1,018 additions and 1,057 deletions.
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 = 'arg' + (uniq == 0 ? '' : uniq.to_s)
name = '_' + (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(*arg0); end
def read_nonblock(*_); 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(*arg0); end
def self.getaddress_orig(*_); end
end

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

class IO
def nonblock(*arg0); end
def nonblock(*_); 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(*arg0); end
def self.generate(*arg0); end
def initialize(*arg0); end
def export(*_); end
def self.generate(*_); end
def initialize(*_); end
def iqmp(); end
def n(); end
def p(); end
def params(); end
def private?(); end
def private_decrypt(*arg0); end
def private_encrypt(*arg0); end
def private_decrypt(*_); end
def private_encrypt(*_); end
def public?(); end
def public_decrypt(*arg0); end
def public_encrypt(*arg0); end
def public_decrypt(*_); end
def public_encrypt(*_); end
def public_key(); end
def q(); 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 set_crt_params(_, _1, _2); end
def set_factors(_, _1); end
def set_key(_, _1, _2); end
def sign_pss(*_); end
def to_der(); end
def to_pem(*arg0); end
def to_s(*arg0); end
def to_pem(*_); end
def to_s(*_); end
def to_text(); end
def verify_pss(*arg0); end
def verify_pss(*_); 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(arg); end
def self.try_convert(_); 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.[](*arg); end
def self.[](*_); 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(*arg); end
def double_check_for(*_); end

def eql?(other); end

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

def arguments(); end

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

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

def attr_writer(*arg); end
def attr_writer(*_); 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(*arg); end
def self.printable_commands(*_); end

def self.printable_tasks(*arg); end
def self.printable_tasks(*_); 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, *arg); end
def set_color(string, *_); 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.[](*arg); end
def self.[](*_); 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.[](*arg); end
def self.[](*_); end

def self.members(); end
end

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

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

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

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

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

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

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

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

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

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

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

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

def exclude_end?(); end

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

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

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

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

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

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

def self.each(&blk); end

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

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

def self.each(&blk); end

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

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

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

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

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

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

class IO
def nread(); end

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

def ready?(); end

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

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

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

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

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

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

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

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

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

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

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

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

def clone(); end
end

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

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

def entries(); end

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

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

def self.resume(); end
end

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

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

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

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

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

def eval_script(); end

Expand Down

0 comments on commit f2f50a0

Please sign in to comment.