diff --git a/gems/sorbet/lib/serialize.rb b/gems/sorbet/lib/serialize.rb index 949f60e7d38..a77c854dd09 100644 --- a/gems/sorbet/lib/serialize.rb +++ b/gems/sorbet/lib/serialize.rb @@ -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 diff --git a/gems/sorbet/test/hidden-method-finder/shims.rb.source b/gems/sorbet/test/hidden-method-finder/shims.rb.source index 85af87587fb..83b36f23579 100644 --- a/gems/sorbet/test/hidden-method-finder/shims.rb.source +++ b/gems/sorbet/test/hidden-method-finder/shims.rb.source @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/gems/sorbet/test/hidden-method-finder/simple/ruby_2_6_hidden.rbi.exp b/gems/sorbet/test/hidden-method-finder/simple/ruby_2_6_hidden.rbi.exp index cb042af4602..3971b6dd42d 100644 --- a/gems/sorbet/test/hidden-method-finder/simple/ruby_2_6_hidden.rbi.exp +++ b/gems/sorbet/test/hidden-method-finder/simple/ruby_2_6_hidden.rbi.exp @@ -15,7 +15,7 @@ class Array end class Array - def self.try_convert(_); end + def self.try_convert(arg); end end BasicObject::BasicObject = BasicObject @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -1965,7 +1965,7 @@ end class DidYouMean::NullChecker def corrections(); end - def initialize(*_); end + def initialize(*arg); end end class DidYouMean::PlainFormatter @@ -2005,7 +2005,7 @@ class Dir end class Dir - def self.exists?(_); end + def self.exists?(arg); end end class ERB @@ -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 @@ -2045,7 +2045,7 @@ class Enumerator::ArithmeticSequence def exclude_end?(); end - def last(*_); end + def last(*arg); end def step(); end end @@ -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 @@ -2093,7 +2093,7 @@ end class Etc::Group extend ::Enumerable - def self.[](*_); end + def self.[](*arg); end def self.each(&blk); end @@ -2120,7 +2120,7 @@ end class Etc::Passwd extend ::Enumerable - def self.[](*_); end + def self.[](*arg); end def self.each(&blk); end @@ -2138,7 +2138,7 @@ class FalseClass end class File - def self.exists?(_); end + def self.exists?(arg); end end module FileUtils @@ -2197,7 +2197,7 @@ class Foo end module GC - def garbage_collect(*_); end + def garbage_collect(*arg); end end module GC @@ -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 @@ -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 @@ -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 @@ -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 @@ -2961,7 +2961,7 @@ class String end class Struct - def filter(*_); end + def filter(*arg); end end Struct::Group = Etc::Group @@ -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 diff --git a/gems/sorbet/test/hidden-method-finder/simple/ruby_2_7_hidden.rbi.exp b/gems/sorbet/test/hidden-method-finder/simple/ruby_2_7_hidden.rbi.exp index 8d240d03165..a9ba23fe2d3 100644 --- a/gems/sorbet/test/hidden-method-finder/simple/ruby_2_7_hidden.rbi.exp +++ b/gems/sorbet/test/hidden-method-finder/simple/ruby_2_7_hidden.rbi.exp @@ -13,7 +13,7 @@ class Array end class Array - def self.try_convert(_); end + def self.try_convert(arg); end end BasicObject::BasicObject = BasicObject @@ -25,7 +25,7 @@ class BigDecimal end class BigDecimal - def self.interpret_loosely(_); end + def self.interpret_loosely(arg); end end class Binding @@ -135,7 +135,7 @@ class Bundler::Fetcher::CompactIndex::ClientFetcher end class Bundler::Fetcher::CompactIndex::ClientFetcher - def self.[](*_); end + def self.[](*arg); end def self.members(); end end @@ -440,7 +440,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 @@ -979,11 +979,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 @@ -1213,9 +1213,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 @@ -1520,7 +1520,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 @@ -1832,7 +1832,7 @@ class Bundler::VersionRanges::NEq end class Bundler::VersionRanges::NEq - def self.[](*_); end + def self.[](*arg); end def self.members(); end end @@ -1867,13 +1867,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 @@ -1972,7 +1972,7 @@ end class DidYouMean::NullChecker def corrections(); end - def initialize(*_); end + def initialize(*arg); end end class DidYouMean::ParseDimensions @@ -2044,7 +2044,7 @@ module Dir::Tmpname end class Dir - def self.exists?(_); end + def self.exists?(arg); end end class ERB @@ -2054,24 +2054,24 @@ class ERB end class Encoding - def _dump(*_); end + def _dump(*arg); end CESU_8 = ::T.let(nil, ::T.untyped) 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 @@ -2085,7 +2085,7 @@ class Enumerator::ArithmeticSequence def exclude_end?(); end - def last(*_); end + def last(*arg); end def step(); end end @@ -2100,9 +2100,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 class Enumerator::Lazy @@ -2121,7 +2121,7 @@ class Enumerator::Yielder end class Enumerator - def self.produce(*_); end + def self.produce(*arg); end end Errno::ECAPMODE = Errno::NOERROR @@ -2156,7 +2156,7 @@ end class Etc::Group extend ::Enumerable - def self.[](*_); end + def self.[](*arg); end def self.each(&blk); end @@ -2183,7 +2183,7 @@ end class Etc::Passwd extend ::Enumerable - def self.[](*_); end + def self.[](*arg); end def self.each(&blk); end @@ -2201,13 +2201,13 @@ class FalseClass end class Fiber - def initialize(*_); end + def initialize(*arg); end end class File - def self.absolute_path?(_); end + def self.absolute_path?(arg); end - def self.exists?(_); end + def self.exists?(arg); end end module FileUtils @@ -2793,31 +2793,31 @@ Gem::Version::Requirement = Gem::Requirement class Hash include ::JSON::Ext::Generator::GeneratorMethods::Hash - def deconstruct_keys(_); end + def deconstruct_keys(arg); end end class Hash - def self.ruby2_keywords_hash(_); end + def self.ruby2_keywords_hash(arg); end - def self.ruby2_keywords_hash?(_); end + def self.ruby2_keywords_hash?(arg); end - 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 set_encoding_by_bom(); 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 @@ -2829,11 +2829,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 @@ -2887,7 +2887,7 @@ class Monitor def try_mon_enter(); end - def wait_for_cond(_, _1); end + def wait_for_cond(arg, arg1); end end module MonitorMixin @@ -2938,27 +2938,27 @@ class OpenStruct 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 @@ -2979,7 +2979,7 @@ end module RubyVM::MJIT def self.enabled?(); end - def self.pause(*_); end + def self.pause(*arg); end def self.resume(); end end @@ -3041,9 +3041,9 @@ end class Struct def deconstruct(); end - def deconstruct_keys(_); end + def deconstruct_keys(arg); end - def filter(*_); end + def filter(*arg); end end Struct::Group = Etc::Group diff --git a/gems/sorbet/test/hidden-method-finder/thorough/ruby_2_6_hidden.rbi.exp b/gems/sorbet/test/hidden-method-finder/thorough/ruby_2_6_hidden.rbi.exp index d08dfcd80f7..87d7c8b0dc0 100644 --- a/gems/sorbet/test/hidden-method-finder/thorough/ruby_2_6_hidden.rbi.exp +++ b/gems/sorbet/test/hidden-method-finder/thorough/ruby_2_6_hidden.rbi.exp @@ -15,7 +15,7 @@ class Array end class Array - def self.try_convert(_); end + def self.try_convert(arg); end end BasicObject::BasicObject = BasicObject @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -1989,7 +1989,7 @@ end class DidYouMean::NullChecker def corrections(); end - def initialize(*_); end + def initialize(*arg); end end class DidYouMean::PlainFormatter @@ -2029,7 +2029,7 @@ class Dir end class Dir - def self.exists?(_); end + def self.exists?(arg); end end class ERB @@ -2039,23 +2039,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 @@ -2069,7 +2069,7 @@ class Enumerator::ArithmeticSequence def exclude_end?(); end - def last(*_); end + def last(*arg); end def step(); end end @@ -2084,9 +2084,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 @@ -2117,7 +2117,7 @@ end class Etc::Group extend ::Enumerable - def self.[](*_); end + def self.[](*arg); end def self.each(&blk); end @@ -2144,7 +2144,7 @@ end class Etc::Passwd extend ::Enumerable - def self.[](*_); end + def self.[](*arg); end def self.each(&blk); end @@ -2162,7 +2162,7 @@ class FalseClass end class File - def self.exists?(_); end + def self.exists?(arg); end end module FileUtils @@ -2215,7 +2215,7 @@ class Float end module GC - def garbage_collect(*_); end + def garbage_collect(*arg); end end module GC @@ -2763,21 +2763,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 @@ -2795,11 +2795,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 @@ -2874,27 +2874,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 @@ -2915,13 +2915,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 @@ -2979,7 +2979,7 @@ class String end class Struct - def filter(*_); end + def filter(*arg); end end Struct::Group = Etc::Group @@ -2989,7 +2989,7 @@ Struct::Passwd = Etc::Passwd Struct::Tms = Process::Tms class TracePoint - def __enable(_, _1); end + def __enable(arg, arg1); end def eval_script(); end diff --git a/gems/sorbet/test/hidden-method-finder/thorough/ruby_2_7_hidden.rbi.exp b/gems/sorbet/test/hidden-method-finder/thorough/ruby_2_7_hidden.rbi.exp index 6171d0cdd80..8eebaf28276 100644 --- a/gems/sorbet/test/hidden-method-finder/thorough/ruby_2_7_hidden.rbi.exp +++ b/gems/sorbet/test/hidden-method-finder/thorough/ruby_2_7_hidden.rbi.exp @@ -13,7 +13,7 @@ class Array end class Array - def self.try_convert(_); end + def self.try_convert(arg); end end BasicObject::BasicObject = BasicObject @@ -25,7 +25,7 @@ class BigDecimal end class BigDecimal - def self.interpret_loosely(_); end + def self.interpret_loosely(arg); end end class Binding @@ -135,7 +135,7 @@ class Bundler::Fetcher::CompactIndex::ClientFetcher end class Bundler::Fetcher::CompactIndex::ClientFetcher - def self.[](*_); end + def self.[](*arg); end def self.members(); end end @@ -440,7 +440,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 @@ -979,11 +979,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 @@ -1213,9 +1213,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 @@ -1520,7 +1520,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 @@ -1832,7 +1832,7 @@ class Bundler::VersionRanges::NEq end class Bundler::VersionRanges::NEq - def self.[](*_); end + def self.[](*arg); end def self.members(); end end @@ -1867,13 +1867,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 @@ -1996,7 +1996,7 @@ end class DidYouMean::NullChecker def corrections(); end - def initialize(*_); end + def initialize(*arg); end end class DidYouMean::ParseDimensions @@ -2068,7 +2068,7 @@ module Dir::Tmpname end class Dir - def self.exists?(_); end + def self.exists?(arg); end end class ERB @@ -2078,24 +2078,24 @@ class ERB end class Encoding - def _dump(*_); end + def _dump(*arg); end CESU_8 = ::T.let(nil, ::T.untyped) 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 @@ -2109,7 +2109,7 @@ class Enumerator::ArithmeticSequence def exclude_end?(); end - def last(*_); end + def last(*arg); end def step(); end end @@ -2124,9 +2124,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 class Enumerator::Lazy @@ -2145,7 +2145,7 @@ class Enumerator::Yielder end class Enumerator - def self.produce(*_); end + def self.produce(*arg); end end Errno::ECAPMODE = Errno::NOERROR @@ -2180,7 +2180,7 @@ end class Etc::Group extend ::Enumerable - def self.[](*_); end + def self.[](*arg); end def self.each(&blk); end @@ -2207,7 +2207,7 @@ end class Etc::Passwd extend ::Enumerable - def self.[](*_); end + def self.[](*arg); end def self.each(&blk); end @@ -2225,13 +2225,13 @@ class FalseClass end class Fiber - def initialize(*_); end + def initialize(*arg); end end class File - def self.absolute_path?(_); end + def self.absolute_path?(arg); end - def self.exists?(_); end + def self.exists?(arg); end end module FileUtils @@ -2811,31 +2811,31 @@ Gem::Version::Requirement = Gem::Requirement class Hash include ::JSON::Ext::Generator::GeneratorMethods::Hash - def deconstruct_keys(_); end + def deconstruct_keys(arg); end end class Hash - def self.ruby2_keywords_hash(_); end + def self.ruby2_keywords_hash(arg); end - def self.ruby2_keywords_hash?(_); end + def self.ruby2_keywords_hash?(arg); end - 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 set_encoding_by_bom(); 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 @@ -2847,11 +2847,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 @@ -2905,7 +2905,7 @@ class Monitor def try_mon_enter(); end - def wait_for_cond(_, _1); end + def wait_for_cond(arg, arg1); end end module MonitorMixin @@ -2956,27 +2956,27 @@ class OpenStruct 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 @@ -2997,7 +2997,7 @@ end module RubyVM::MJIT def self.enabled?(); end - def self.pause(*_); end + def self.pause(*arg); end def self.resume(); end end @@ -3059,9 +3059,9 @@ end class Struct def deconstruct(); end - def deconstruct_keys(_); end + def deconstruct_keys(arg); end - def filter(*_); end + def filter(*arg); end end Struct::Group = Etc::Group diff --git a/parser/Builder.cc b/parser/Builder.cc index f7f3f1ae582..baffbabd6eb 100644 --- a/parser/Builder.cc +++ b/parser/Builder.cc @@ -209,7 +209,10 @@ class Builder::Impl { } unique_ptr arg(const token *name) { - return make_unique(tokLoc(name), gs_.enterNameUTF8(name->string())); + core::LocOffsets loc = tokLoc(name); + checkReservedForNumberedParameters(name->string(), loc); + + return make_unique(loc, gs_.enterNameUTF8(name->string())); } unique_ptr args(const token *begin, sorbet::parser::NodeVec args, const token *end, bool check_args) { @@ -273,9 +276,8 @@ class Builder::Impl { unique_ptr assignable(unique_ptr node) { if (auto *id = parser::cast_node(node.get())) { auto name_str = id->name.show(gs_); - if (isNumberedParameterName(name_str) && driver_->lex.context.inDynamicBlock()) { - error(ruby_parser::dclass::CantAssignToNumparam, id->loc, name_str); - } + checkReservedForNumberedParameters(name_str, id->loc); + driver_->lex.declare(name_str); return make_unique(id->loc, id->name); } else if (auto *iv = parser::cast_node(node.get())) { @@ -497,10 +499,12 @@ class Builder::Impl { if (name != nullptr) { loc = tokLoc(name); nm = gs_.enterNameUTF8(name->string()); + checkReservedForNumberedParameters(name->string(), loc); } else { loc = tokLoc(amper); nm = gs_.freshNameUnique(core::UniqueNameKind::Parser, core::Names::ampersand(), ++uniqueCounter_); } + return make_unique(loc, nm); } @@ -731,6 +735,8 @@ class Builder::Impl { core::LocOffsets declLoc = tokLoc(def, name).join(maybe_loc(args)); core::LocOffsets loc = tokLoc(def, end); + checkReservedForNumberedParameters(name->string(), declLoc); + return make_unique(loc, declLoc, gs_.enterNameUTF8(name->string()), std::move(args), std::move(body)); } @@ -763,6 +769,7 @@ class Builder::Impl { if (isLiteralNode(*(head->definee.get()))) { error(ruby_parser::dclass::SingletonLiteral, head->definee->loc); } + checkReservedForNumberedParameters(name->string(), declLoc); return make_unique(loc, declLoc, std::move(head->definee), head->name, std::move(args), std::move(body)); } @@ -912,11 +919,17 @@ class Builder::Impl { } unique_ptr kwarg(const token *name) { - return make_unique(tokLoc(name), gs_.enterNameUTF8(name->string())); + core::LocOffsets loc = tokLoc(name); + checkReservedForNumberedParameters(name->string(), loc); + + return make_unique(loc, gs_.enterNameUTF8(name->string())); } unique_ptr kwoptarg(const token *name, unique_ptr value) { - return make_unique(tokLoc(name).join(value->loc), gs_.enterNameUTF8(name->string()), tokLoc(name), + core::LocOffsets loc = tokLoc(name); + checkReservedForNumberedParameters(name->string(), loc); + + return make_unique(loc.join(value->loc), gs_.enterNameUTF8(name->string()), tokLoc(name), std::move(value)); } @@ -931,9 +944,11 @@ class Builder::Impl { if (name != nullptr) { loc = loc.join(tokLoc(name)); nm = gs_.enterNameUTF8(name->string()); + checkReservedForNumberedParameters(name->string(), loc); } else { nm = gs_.freshNameUnique(core::UniqueNameKind::Parser, core::Names::starStar(), ++uniqueCounter_); } + return make_unique(loc, nm); } @@ -1154,7 +1169,10 @@ class Builder::Impl { } unique_ptr optarg_(const token *name, const token *eql, unique_ptr value) { - return make_unique(tokLoc(name).join(value->loc), gs_.enterNameUTF8(name->string()), tokLoc(name), + core::LocOffsets loc = tokLoc(name); + checkReservedForNumberedParameters(name->string(), loc); + + return make_unique(loc.join(value->loc), gs_.enterNameUTF8(name->string()), tokLoc(name), std::move(value)); } @@ -1254,10 +1272,12 @@ class Builder::Impl { nameLoc = tokLoc(name); loc = loc.join(nameLoc); nm = gs_.enterNameUTF8(name->string()); + checkReservedForNumberedParameters(name->string(), nameLoc); } else { // case like 'def m(*); end' nm = gs_.freshNameUnique(core::UniqueNameKind::Parser, core::Names::star(), ++uniqueCounter_); } + return make_unique(loc, nm, nameLoc); } @@ -1266,7 +1286,10 @@ class Builder::Impl { } unique_ptr shadowarg(const token *name) { - return make_unique(tokLoc(name), gs_.enterNameUTF8(name->string())); + core::LocOffsets loc = tokLoc(name); + checkReservedForNumberedParameters(name->string(), loc); + + return make_unique(loc, gs_.enterNameUTF8(name->string())); } unique_ptr splat(const token *star, unique_ptr arg) { @@ -1586,6 +1609,12 @@ class Builder::Impl { parser::isa_node(&node); } + void checkReservedForNumberedParameters(std::string name, core::LocOffsets loc) { + if (isNumberedParameterName(name)) { + error(ruby_parser::dclass::ReservedForNumparam, loc, name); + } + } + bool isNumberedParameterName(std::string_view name) { return name.length() == 2 && name[0] == '_' && name[1] >= '1' && name[1] <= '9'; } diff --git a/rbi/gems/msgpack.rbi b/rbi/gems/msgpack.rbi index 85bbc7d1446..44bef180335 100644 --- a/rbi/gems/msgpack.rbi +++ b/rbi/gems/msgpack.rbi @@ -44,11 +44,11 @@ end class MessagePack::Buffer sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def <<(_); end + def <<(arg0); end sig {returns(::T.untyped)} def clear(); end @@ -64,49 +64,49 @@ class MessagePack::Buffer sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def io(); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def read(*_); end + def read(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def read_all(*_); end + def read_all(*arg0); end sig {returns(::T.untyped)} def size(); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def skip(_); end + def skip(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def skip_all(_); end + def skip_all(arg0); end sig {returns(::T.untyped)} def to_a(); end @@ -119,19 +119,19 @@ class MessagePack::Buffer sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write(_); end + def write(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write_to(_); end + def write_to(arg0); end end module MessagePack::CoreExt @@ -153,41 +153,41 @@ class MessagePack::ExtensionValue < Struct sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def payload=(_); end + def payload=(arg0); end sig {returns(::T.untyped)} def type(); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def type=(_); end + def type=(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.[](*_); end + def self.[](*arg0); end sig {returns(::T.untyped)} def self.members(); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.new(*_); end + def self.new(*arg0); end end class MessagePack::Factory @@ -202,11 +202,11 @@ class MessagePack::Factory sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig do params( @@ -228,19 +228,19 @@ class MessagePack::Factory sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def packer(*_); end + def packer(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def register_type(*_); end + def register_type(*arg0); end sig do params( @@ -270,11 +270,11 @@ class MessagePack::Factory sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def unpacker(*_); end + def unpacker(*arg0); end end class MessagePack::MalformedFormatError < MessagePack::UnpackError @@ -301,27 +301,27 @@ class MessagePack::Packer sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def pack(_); end + def pack(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def register_type(*_); end + def register_type(*arg0); end sig {returns(::T.untyped)} def registered_types(); end @@ -348,114 +348,114 @@ class MessagePack::Packer sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write(_); end + def write(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write_array(_); end + def write_array(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write_array_header(_); end + def write_array_header(arg0); end sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def write_ext(_, _1); end + def write_ext(arg0, arg1); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write_extension(_); end + def write_extension(arg0); end sig {returns(::T.untyped)} def write_false(); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write_float(_); end + def write_float(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write_float32(_); end + def write_float32(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write_hash(_); end + def write_hash(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write_int(_); end + def write_int(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write_map_header(_); end + def write_map_header(arg0); end sig {returns(::T.untyped)} def write_nil(); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write_string(_); end + def write_string(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write_symbol(_); end + def write_symbol(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def write_to(_); end + def write_to(arg0); end sig {returns(::T.untyped)} def write_true(); end @@ -489,30 +489,30 @@ class MessagePack::Unpacker sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def feed(_); end + def feed(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def feed_each(_); end + def feed_each(arg0); end sig {returns(::T.untyped)} def full_unpack(); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def read(); end @@ -525,11 +525,11 @@ class MessagePack::Unpacker sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def register_type(*_); end + def register_type(*arg0); end sig {returns(::T.untyped)} def registered_types(); end diff --git a/rbi/stdlib/openssl.rbi b/rbi/stdlib/openssl.rbi index 92311bfa826..0a168feefa9 100644 --- a/rbi/stdlib/openssl.rbi +++ b/rbi/stdlib/openssl.rbi @@ -818,187 +818,187 @@ module OpenSSL::ASN1 sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.BMPString(*_); end + def self.BMPString(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.BitString(*_); end + def self.BitString(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.Boolean(*_); end + def self.Boolean(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.EndOfContent(*_); end + def self.EndOfContent(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.Enumerated(*_); end + def self.Enumerated(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.GeneralString(*_); end + def self.GeneralString(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.GeneralizedTime(*_); end + def self.GeneralizedTime(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.GraphicString(*_); end + def self.GraphicString(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.IA5String(*_); end + def self.IA5String(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.ISO64String(*_); end + def self.ISO64String(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.Integer(*_); end + def self.Integer(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.Null(*_); end + def self.Null(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.NumericString(*_); end + def self.NumericString(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.ObjectId(*_); end + def self.ObjectId(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.OctetString(*_); end + def self.OctetString(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.PrintableString(*_); end + def self.PrintableString(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.Sequence(*_); end + def self.Sequence(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.Set(*_); end + def self.Set(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.T61String(*_); end + def self.T61String(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.UTCTime(*_); end + def self.UTCTime(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.UTF8String(*_); end + def self.UTF8String(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.UniversalString(*_); end + def self.UniversalString(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.VideotexString(*_); end + def self.VideotexString(*arg0); end # Decodes a BER- or DER-encoded value and creates an ASN1Data instance. *der* # may be a [`String`](https://docs.ruby-lang.org/en/2.7.0/String.html) or any @@ -1013,11 +1013,11 @@ module OpenSSL::ASN1 # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.decode(_); end + def self.decode(arg0); end # Similar to decode with the difference that decode expects one distinct value # represented in *der*. decode\_all on the contrary decodes a sequence of @@ -1031,11 +1031,11 @@ module OpenSSL::ASN1 # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.decode_all(_); end + def self.decode_all(arg0); end # If a block is given, it prints out each of the elements encountered. Block # parameters are (in that order): @@ -1066,11 +1066,11 @@ module OpenSSL::ASN1 # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.traverse(_); end + def self.traverse(arg0); end end # The top-level class representing any ASN.1 object. When parsed by @@ -1210,13 +1210,13 @@ class OpenSSL::ASN1::ASN1Data sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, ) .returns(::T.untyped) end - def initialize(_, _1, _2); end + def initialize(arg0, arg1, arg2); end # An [`Integer`](https://docs.ruby-lang.org/en/2.7.0/Integer.html) # representing the tag number of this @@ -1360,11 +1360,11 @@ class OpenSSL::ASN1::Constructive < OpenSSL::ASN1::ASN1Data sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # May be used as a hint for encoding a value either implicitly or explicitly # by setting it either to `:IMPLICIT` or to `:EXPLICIT`. *tagging* is not set @@ -1469,13 +1469,13 @@ class OpenSSL::ASN1::ObjectId < OpenSSL::ASN1::Primitive # if it fails. sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, ) .returns(::T.untyped) end - def self.register(_, _1, _2); end + def self.register(arg0, arg1, arg2); end end class OpenSSL::ASN1::OctetString < OpenSSL::ASN1::Primitive @@ -1578,11 +1578,11 @@ end class OpenSSL::ASN1::Primitive < OpenSSL::ASN1::ASN1Data sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # May be used as a hint for encoding a value either implicitly or explicitly # by setting it either to `:IMPLICIT` or to `:EXPLICIT`. *tagging* is not set @@ -1638,62 +1638,62 @@ class OpenSSL::BN include ::Comparable sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def %(_); end + def %(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def *(_); end + def *(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def **(_); end + def **(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def +(_); end + def +(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def -(_); end + def -(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def <<(_); end + def <<(arg0); end # Alias for: # [`cmp`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/BN.html#method-i-cmp) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def <=>(_); end + def <=>(arg0); end # Returns `true` only if *obj* has the same value as *bn*. Contrast this with # [`OpenSSL::BN#eql?`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/BN.html#method-i-eql-3F), @@ -1704,90 +1704,90 @@ class OpenSSL::BN # [`===`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/BN.html#method-i-3D-3D-3D) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def ==(_); end + def ==(arg0); end # Alias for: # [`==`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/BN.html#method-i-3D-3D) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def ===(_); end + def ===(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def >>(_); end + def >>(arg0); end # Tests bit *bit* in *bn* and returns `true` if set, `false` if not set. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def bit_set?(_); end + def bit_set?(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def clear_bit!(_); end + def clear_bit!(arg0); end # Also aliased as: # [`<=>`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/BN.html#method-i-3C-3D-3E) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def cmp(_); end + def cmp(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def coerce(_); end + def coerce(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def copy(_); end + def copy(arg0); end # Returns `true` only if *obj* is a `OpenSSL::BN` with the same value as *bn*. # Contrast this with OpenSSL::BN#==, which performs type conversions. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def eql?(_); end + def eql?(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def gcd(_); end + def gcd(arg0); end # Returns a hash code for this object. # @@ -1798,79 +1798,79 @@ class OpenSSL::BN sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def lshift!(_); end + def lshift!(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def mask_bits!(_); end + def mask_bits!(arg0); end sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def mod_add(_, _1); end + def mod_add(arg0, arg1); end sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def mod_exp(_, _1); end + def mod_exp(arg0, arg1); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def mod_inverse(_); end + def mod_inverse(arg0); end sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def mod_mul(_, _1); end + def mod_mul(arg0, arg1); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def mod_sqr(_); end + def mod_sqr(arg0); end sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def mod_sub(_, _1); end + def mod_sub(arg0, arg1); end sig {returns(::T.untyped)} def num_bits(); end @@ -1900,11 +1900,11 @@ class OpenSSL::BN # * *checks* - integer sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def prime?(*_); end + def prime?(*arg0); end # Performs a Miller-Rabin primality test. This is same as # [`prime?`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/BN.html#method-i-prime-3F) @@ -1915,27 +1915,27 @@ class OpenSSL::BN # * *trial\_div* - boolean sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def prime_fasttest?(*_); end + def prime_fasttest?(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def rshift!(_); end + def rshift!(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def set_bit!(_); end + def set_bit!(arg0); end sig {returns(::T.untyped)} def sqr(); end @@ -1962,19 +1962,19 @@ class OpenSSL::BN # * 16 - hex sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def to_s(*_); end + def to_s(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def ucmp(_); end + def ucmp(arg0); end sig {returns(::T.untyped)} def zero?(); end @@ -1990,43 +1990,43 @@ class OpenSSL::BN # * *rem* - [`BN`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/BN.html) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.generate_prime(*_); end + def self.generate_prime(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.pseudo_rand(*_); end + def self.pseudo_rand(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.pseudo_rand_range(_); end + def self.pseudo_rand_range(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.rand(*_); end + def self.rand(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.rand_range(_); end + def self.rand_range(arg0); end end # Generic [`Error`](https://docs.ruby-lang.org/en/2.7.0/Error.html) for all of @@ -2141,11 +2141,11 @@ module OpenSSL::Buffering sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Writes *args* to the stream. # @@ -2702,11 +2702,11 @@ class OpenSSL::Cipher # [`Cipher#final`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/Cipher.html#method-i-final). sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def auth_tag(*_); end + def auth_tag(*arg0); end # Sets the authentication tag to verify the integrity of the ciphertext. This # can be called only when the cipher supports AE. The tag must be set after @@ -2774,11 +2774,11 @@ class OpenSSL::Cipher # Internally calls EVP\_CipherInit\_ex(ctx, NULL, NULL, NULL, NULL, 0). sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def decrypt(*_); end + def decrypt(*arg0); end # Initializes the # [`Cipher`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/Cipher.html) for @@ -2796,11 +2796,11 @@ class OpenSSL::Cipher # Internally calls EVP\_CipherInit\_ex(ctx, NULL, NULL, NULL, NULL, 1). sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def encrypt(*_); end + def encrypt(*arg0); end # Returns the remaining data held in the cipher object. Further calls to # [`Cipher#update`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/Cipher.html#method-i-update) @@ -2821,11 +2821,11 @@ class OpenSSL::Cipher sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(_); end + def initialize(arg0); end # Sets the cipher IV. Please note that since you should never be using ECB # mode, an IV is always explicitly required and should be set prior to @@ -2947,11 +2947,11 @@ class OpenSSL::Cipher # A minimum of 1000 iterations is recommended. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def pkcs5_keyivgen(*_); end + def pkcs5_keyivgen(*arg0); end # Generate a random IV with # [`OpenSSL::Random.random_bytes`](https://docs.ruby-lang.org/en/2.7.0/Random.html#method-c-random_bytes) @@ -2998,11 +2998,11 @@ class OpenSSL::Cipher # it. *buffer* will be resized automatically. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def update(*_); end + def update(*arg0); end # Returns the names of all available ciphers in an array. sig {returns(::T.untyped)} @@ -3354,11 +3354,11 @@ class OpenSSL::Config sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.load(*_); end + def self.load(*arg0); end # Parses a given *string* as a blob that contains configuration for # [`OpenSSL`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL.html). @@ -3520,11 +3520,11 @@ class OpenSSL::Digest < Digest::Class # Alias for: update sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def <<(_); end + def <<(arg0); end # Returns the block length of the digest algorithm, i.e. the length in bytes # of an individual block. Most modern algorithms partition a message to be @@ -3554,11 +3554,11 @@ class OpenSSL::Digest < Digest::Class sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Returns the sn of this # [`Digest`](https://docs.ruby-lang.org/en/2.7.0/Digest.html) algorithm. @@ -3597,11 +3597,11 @@ class OpenSSL::Digest < Digest::Class # Also aliased as: << sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def update(_); end + def update(arg0); end # Return the hash value computed with *name* # [`Digest`](https://docs.ruby-lang.org/en/2.7.0/Digest.html). *name* is @@ -4000,11 +4000,11 @@ class OpenSSL::Engine # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def cipher(_); end + def cipher(arg0); end # Returns an array of command definitions for the current engine sig {returns(::T.untyped)} @@ -4015,11 +4015,11 @@ class OpenSSL::Engine # Raises an EngineError if the command fails. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def ctrl_cmd(*_); end + def ctrl_cmd(*arg0); end # Returns a new instance of # [`OpenSSL::Digest`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/Digest.html) @@ -4037,11 +4037,11 @@ class OpenSSL::Engine # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def digest(_); end + def digest(arg0); end # Releases all internal structural references for this engine. # @@ -4071,11 +4071,11 @@ class OpenSSL::Engine # unavailable. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def load_private_key(*_); end + def load_private_key(*arg0); end # Loads the given public key identified by *id* and *data*. # @@ -4084,11 +4084,11 @@ class OpenSSL::Engine # unavailable. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def load_public_key(*_); end + def load_public_key(*arg0); end # Get the descriptive name for this engine. # @@ -4118,11 +4118,11 @@ class OpenSSL::Engine # See also sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def set_default(_); end + def set_default(arg0); end # Fetches the engine as specified by the *id* # [`String`](https://docs.ruby-lang.org/en/2.7.0/String.html). @@ -4137,11 +4137,11 @@ class OpenSSL::Engine # for the currently loaded engines. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.by_id(_); end + def self.by_id(arg0); end # It is only necessary to run cleanup when engines are loaded via # [`OpenSSL::Engine.load`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/Engine.html#method-c-load). @@ -4163,11 +4163,11 @@ class OpenSSL::Engine # nil is returned. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.load(*_); end + def self.load(*arg0); end end # This is the generic exception for @@ -4226,11 +4226,11 @@ class OpenSSL::HMAC # [`update`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/HMAC.html#method-i-update) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def <<(_); end + def <<(arg0); end # Returns the authentication code an instance represents as a binary string. # @@ -4256,12 +4256,12 @@ class OpenSSL::HMAC sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def initialize(_, _1); end + def initialize(arg0, arg1); end # Alias for: # [`hexdigest`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/HMAC.html#method-i-hexdigest) @@ -4311,11 +4311,11 @@ class OpenSSL::HMAC # [`<<`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/HMAC.html#method-i-3C-3C) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def update(_); end + def update(arg0); end # Returns the authentication code as a binary string. The *digest* parameter # specifies the digest algorithm to use. This may be a @@ -4334,13 +4334,13 @@ class OpenSSL::HMAC # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, ) .returns(::T.untyped) end - def self.digest(_, _1, _2); end + def self.digest(arg0, arg1, arg2); end # Returns the authentication code as a hex-encoded string. The *digest* # parameter specifies the digest algorithm to use. This may be a @@ -4359,13 +4359,13 @@ class OpenSSL::HMAC # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, ) .returns(::T.untyped) end - def self.hexdigest(_, _1, _2); end + def self.hexdigest(arg0, arg1, arg2); end end # Document-class: @@ -4481,11 +4481,11 @@ class OpenSSL::Netscape::SPKI sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Returns the public key associated with the # [`SPKI`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/Netscape/SPKI.html), an @@ -4527,12 +4527,12 @@ class OpenSSL::Netscape::SPKI # [`OpenSSL::PKey`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey.html). sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def sign(_, _1); end + def sign(arg0, arg1); end # Returns the DER encoding of this # [`SPKI`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/Netscape/SPKI.html). @@ -4571,11 +4571,11 @@ class OpenSSL::Netscape::SPKI # should be used. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def verify(_); end + def verify(arg0); end end # Generic [`Exception`](https://docs.ruby-lang.org/en/2.7.0/Exception.html) @@ -4802,11 +4802,11 @@ class OpenSSL::OCSP::BasicResponse # be added. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_nonce(*_); end + def add_nonce(*arg0); end # Adds a certificate status for *certificate\_id*. *status* is the status, and # must be one of these: @@ -4838,27 +4838,27 @@ class OpenSSL::OCSP::BasicResponse # as the relative seconds from the current time. sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, - _3: ::T.untyped, - _4: ::T.untyped, - _5: ::T.untyped, - _6: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, + arg3: ::T.untyped, + arg4: ::T.untyped, + arg5: ::T.untyped, + arg6: ::T.untyped, ) .returns(::T.untyped) end - def add_status(_, _1, _2, _3, _4, _5, _6); end + def add_status(arg0, arg1, arg2, arg3, arg4, arg5, arg6); end # Copies the nonce from *request* into this response. Returns 1 on success and # 0 on failure. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def copy_nonce(_); end + def copy_nonce(arg0); end # Returns a SingleResponse whose CertId matches with *certificate\_id*, or # `nil` if this @@ -4866,19 +4866,19 @@ class OpenSSL::OCSP::BasicResponse # does not contain it. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def find_response(_); end + def find_response(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Returns an [`Array`](https://docs.ruby-lang.org/en/2.7.0/Array.html) of # SingleResponse for this @@ -4900,11 +4900,11 @@ class OpenSSL::OCSP::BasicResponse # : use signer's public key hash as responderID sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def sign(*_); end + def sign(*arg0); end # Returns an [`Array`](https://docs.ruby-lang.org/en/2.7.0/Array.html) of # statuses for this response. Each status contains a CertificateId, the status @@ -4930,11 +4930,11 @@ class OpenSSL::OCSP::BasicResponse # [`OpenSSL::OCSP::Request#verify`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/OCSP/Request.html#method-i-verify). sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def verify(*_); end + def verify(*arg0); end end # An @@ -4945,21 +4945,21 @@ class OpenSSL::OCSP::CertificateId # same. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def cmp(_); end + def cmp(arg0); end # Compares this certificate id's issuer with *other* and returns `true` if # they are the same. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def cmp_issuer(_); end + def cmp_issuer(arg0); end # Returns the ln (long name) of the hash algorithm used to generate the # issuerNameHash and the issuerKeyHash values. @@ -4968,11 +4968,11 @@ class OpenSSL::OCSP::CertificateId sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Returns the issuerKeyHash of this certificate ID, the hash of the issuer's # public key. @@ -5008,11 +5008,11 @@ class OpenSSL::OCSP::Request # Adds *certificate\_id* to the request. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_certid(_); end + def add_certid(arg0); end # Adds a *nonce* to the # [`OCSP`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/OCSP.html) request. If @@ -5022,11 +5022,11 @@ class OpenSSL::OCSP::Request # it. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_nonce(*_); end + def add_nonce(*arg0); end # Returns all certificate IDs in this request. sig {returns(::T.untyped)} @@ -5053,19 +5053,19 @@ class OpenSSL::OCSP::Request # an error. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def check_nonce(_); end + def check_nonce(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Signs this [`OCSP`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/OCSP.html) # request using *cert*, *key* and optional *digest*. If *digest* is not @@ -5082,11 +5082,11 @@ class OpenSSL::OCSP::Request # : Don't include any certificates in the request. *certs* will be ignored. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def sign(*_); end + def sign(*arg0); end # Returns this request as a DER-encoded string sig {returns(::T.untyped)} @@ -5103,11 +5103,11 @@ class OpenSSL::OCSP::Request # to check whether the request is signed or not. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def verify(*_); end + def verify(*arg0); end end # An @@ -5121,11 +5121,11 @@ class OpenSSL::OCSP::Response sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Returns the status of the response. sig {returns(::T.untyped)} @@ -5144,12 +5144,12 @@ class OpenSSL::OCSP::Response # from *status* and *basic\_response*. sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def self.create(_, _1); end + def self.create(arg0, arg1); end end # An @@ -5194,22 +5194,22 @@ class OpenSSL::OCSP::SingleResponse # the age of responses. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def check_validity(*_); end + def check_validity(*arg0); end sig {returns(::T.untyped)} def extensions(); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(_); end + def initialize(arg0); end sig {returns(::T.untyped)} def next_update(); end @@ -5246,11 +5246,11 @@ class OpenSSL::PKCS12 sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def key(); end @@ -5282,11 +5282,11 @@ class OpenSSL::PKCS12 # documentation for PKCS12\_create(). sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.create(*_); end + def self.create(*arg0); end end class OpenSSL::PKCS12::PKCS12Error < OpenSSL::OpenSSLError @@ -5295,26 +5295,26 @@ end module OpenSSL::PKCS5 sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, - _3: ::T.untyped, - _4: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, + arg3: ::T.untyped, + arg4: ::T.untyped, ) .returns(::T.untyped) end - def self.pbkdf2_hmac(_, _1, _2, _3, _4); end + def self.pbkdf2_hmac(arg0, arg1, arg2, arg3, arg4); end sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, - _3: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, + arg3: ::T.untyped, ) .returns(::T.untyped) end - def self.pbkdf2_hmac_sha1(_, _1, _2, _3); end + def self.pbkdf2_hmac_sha1(arg0, arg1, arg2, arg3); end end class OpenSSL::PKCS5::PKCS5Error < OpenSSL::OpenSSLError @@ -5334,45 +5334,45 @@ class OpenSSL::PKCS7 sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_certificate(_); end + def add_certificate(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_crl(_); end + def add_crl(arg0); end # Also aliased as: # [`data=`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKCS7.html#method-i-data-3D) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_data(_); end + def add_data(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_recipient(_); end + def add_recipient(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_signer(_); end + def add_signer(arg0); end sig {returns(::T.untyped)} def certificates(); end @@ -5419,11 +5419,11 @@ class OpenSSL::PKCS7 sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def decrypt(*_); end + def decrypt(*arg0); end sig {returns(::T.untyped)} def detached(); end @@ -5452,11 +5452,11 @@ class OpenSSL::PKCS7 sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def recipients(); end @@ -5490,43 +5490,43 @@ class OpenSSL::PKCS7 sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def verify(*_); end + def verify(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.encrypt(*_); end + def self.encrypt(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.read_smime(_); end + def self.read_smime(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.sign(*_); end + def self.sign(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.write_smime(*_); end + def self.write_smime(*arg0); end end class OpenSSL::PKCS7::PKCS7Error < OpenSSL::OpenSSLError @@ -5538,11 +5538,11 @@ class OpenSSL::PKCS7::RecipientInfo sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(_); end + def initialize(arg0); end sig {returns(::T.untyped)} def issuer(); end @@ -5554,13 +5554,13 @@ end class OpenSSL::PKCS7::SignerInfo sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, ) .returns(::T.untyped) end - def initialize(_, _1, _2); end + def initialize(arg0, arg1, arg2); end # Also aliased as: # [`name`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKCS7/SignerInfo.html#method-i-name) @@ -5650,11 +5650,11 @@ module OpenSSL::PKey # PEM resource. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.read(*_); end + def self.read(*arg0); end end # An implementation of the Diffie-Hellman key exchange protocol based on @@ -5711,11 +5711,11 @@ class OpenSSL::PKey::DH < OpenSSL::PKey::PKey # parameters only. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def compute_key(_); end + def compute_key(arg0); end # Encodes this # [`DH`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/DH.html) to its PEM @@ -5761,11 +5761,11 @@ class OpenSSL::PKey::DH < OpenSSL::PKey::PKey sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def p(); end @@ -5868,24 +5868,24 @@ class OpenSSL::PKey::DH < OpenSSL::PKey::PKey # *priv\_key* may be `nil`. sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def set_key(_, _1); end + def set_key(arg0, arg1); end # Sets *p*, *q*, *g* to the # [`DH`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/DH.html) instance. sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, ) .returns(::T.untyped) end - def set_pqg(_, _1, _2); end + def set_pqg(arg0, arg1, arg2); end # Encodes this # [`DH`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/DH.html) to its DER @@ -5919,11 +5919,11 @@ class OpenSSL::PKey::DH < OpenSSL::PKey::PKey # * *generator* is a small number > 1, typically 2 or 5. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.generate(*_); end + def self.generate(*arg0); end end # Generic exception that is raised if an operation on a DH @@ -5960,11 +5960,11 @@ class OpenSSL::PKey::DSA < OpenSSL::PKey::PKey # [`to_s`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/DSA.html#method-i-to_s) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def export(*_); end + def export(*arg0); end sig {returns(::T.untyped)} def g(); end @@ -5979,11 +5979,11 @@ class OpenSSL::PKey::DSA < OpenSSL::PKey::PKey sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def p(); end @@ -6071,24 +6071,24 @@ class OpenSSL::PKey::DSA < OpenSSL::PKey::PKey # *priv\_key* may be `nil`. sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def set_key(_, _1); end + def set_key(arg0, arg1); end # Sets *p*, *q*, *g* to the # [`DSA`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/DSA.html) instance. sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, ) .returns(::T.untyped) end - def set_pqg(_, _1, _2); end + def set_pqg(arg0, arg1, arg2); end # Computes and returns the # [`DSA`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/DSA.html) signature @@ -6111,11 +6111,11 @@ class OpenSSL::PKey::DSA < OpenSSL::PKey::PKey # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def syssign(_); end + def syssign(arg0); end # Verifies whether the signature is valid given the message digest input. It # does so by validating *sig* using the public key of this @@ -6139,12 +6139,12 @@ class OpenSSL::PKey::DSA < OpenSSL::PKey::PKey # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def sysverify(_, _1); end + def sysverify(arg0, arg1); end # Encodes this # [`DSA`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/DSA.html) to its @@ -6156,21 +6156,21 @@ class OpenSSL::PKey::DSA < OpenSSL::PKey::PKey # [`export`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/DSA.html#method-i-export) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def to_pem(*_); end + def to_pem(*arg0); end # Alias for: # [`export`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/DSA.html#method-i-export) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def to_s(*_); end + def to_s(*arg0); end # Prints all parameters of key to buffer INSECURE: PRIVATE INFORMATIONS CAN # LEAK OUT!!! Don't use :-)) (I's up to you) @@ -6185,11 +6185,11 @@ class OpenSSL::PKey::DSA < OpenSSL::PKey::PKey # * *size* is an integer representing the desired key size. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.generate(_); end + def self.generate(arg0); end end # Generic exception that is raised if an operation on a DSA @@ -6228,32 +6228,32 @@ class OpenSSL::PKey::EC < OpenSSL::PKey::PKey # documentation for ECDH\_compute\_key() sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def dh_compute_key(_); end + def dh_compute_key(arg0); end # See the [`OpenSSL`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL.html) # documentation for ECDSA\_sign() sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def dsa_sign_asn1(_); end + def dsa_sign_asn1(arg0); end # See the [`OpenSSL`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL.html) # documentation for ECDSA\_verify() sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def dsa_verify_asn1(_, _1); end + def dsa_verify_asn1(arg0, arg1); end # Outputs the [`EC`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/EC.html) # key in PEM encoding. If *cipher* and *pass\_phrase* are given they will be @@ -6266,11 +6266,11 @@ class OpenSSL::PKey::EC < OpenSSL::PKey::PKey # [`to_pem`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/EC.html#method-i-to_pem) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def export(*_); end + def export(*arg0); end # Alias for: # [`generate_key!`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/EC.html#method-i-generate_key-21) @@ -6318,11 +6318,11 @@ class OpenSSL::PKey::EC < OpenSSL::PKey::PKey sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Returns whether this # [`EC`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/EC.html) instance @@ -6395,11 +6395,11 @@ class OpenSSL::PKey::EC < OpenSSL::PKey::PKey # [`export`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/EC.html#method-i-export) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def to_pem(*_); end + def to_pem(*arg0); end # See the [`OpenSSL`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL.html) # documentation for EC\_KEY\_print() @@ -6420,11 +6420,11 @@ class OpenSSL::PKey::EC < OpenSSL::PKey::PKey # with a new random private and public key. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.generate(_); end + def self.generate(arg0); end end class OpenSSL::PKey::EC::Group @@ -6432,11 +6432,11 @@ class OpenSSL::PKey::EC::Group # [`eql?`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/EC/Group.html#method-i-eql-3F) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def ==(_); end + def ==(arg0); end # Returns the flags set on the group. # @@ -6490,11 +6490,11 @@ class OpenSSL::PKey::EC::Group # [`==`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/EC/Group.html#method-i-3D-3D) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def eql?(_); end + def eql?(arg0); end # Returns the generator of the group. # @@ -6505,11 +6505,11 @@ class OpenSSL::PKey::EC::Group sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Returns the order of the group. # @@ -6576,13 +6576,13 @@ class OpenSSL::PKey::EC::Group # documentation for EC\_GROUP\_set\_generator() sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, ) .returns(::T.untyped) end - def set_generator(_, _1, _2); end + def set_generator(arg0, arg1, arg2); end # See the [`OpenSSL`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL.html) # documentation for i2d\_ECPKParameters\_bio() @@ -6608,21 +6608,21 @@ class OpenSSL::PKey::EC::Point # [`eql?`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/EC/Point.html#method-i-eql-3F) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def ==(_); end + def ==(arg0); end # Also aliased as: # [`==`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/EC/Point.html#method-i-3D-3D) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def eql?(_); end + def eql?(arg0); end sig {returns(::T.untyped)} def group(); end @@ -6632,11 +6632,11 @@ class OpenSSL::PKey::EC::Point sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def invert!(); end @@ -6659,11 +6659,11 @@ class OpenSSL::PKey::EC::Point # Please note that `points[0]` is not multiplied by `bns[0]`, but `bns[1]`. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def mul(*_); end + def mul(*arg0); end sig {returns(::T.untyped)} def on_curve?(); end @@ -6684,11 +6684,11 @@ class OpenSSL::PKey::EC::Point # for more information. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def to_bn(*_); end + def to_bn(*arg0); end end class OpenSSL::PKey::EC::Point::Error < OpenSSL::OpenSSLError @@ -6730,12 +6730,12 @@ class OpenSSL::PKey::PKey # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def sign(_, _1); end + def sign(arg0, arg1); end # To verify the [`String`](https://docs.ruby-lang.org/en/2.7.0/String.html) # *signature*, *digest*, an instance of @@ -6760,13 +6760,13 @@ class OpenSSL::PKey::PKey # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, ) .returns(::T.untyped) end - def verify(_, _1, _2); end + def verify(arg0, arg1, arg2); end end # Raised when errors occur during PKey#sign or PKey#verify. @@ -6843,19 +6843,19 @@ class OpenSSL::PKey::RSA < OpenSSL::PKey::PKey # [`to_s`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/RSA.html#method-i-to_s) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def export(*_); end + def export(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def iqmp(); end @@ -6907,22 +6907,22 @@ class OpenSSL::PKey::RSA < OpenSSL::PKey::PKey # private key. *padding* defaults to PKCS1\_PADDING. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def private_decrypt(*_); end + def private_decrypt(*arg0); end # Encrypt *string* with the private key. *padding* defaults to PKCS1\_PADDING. # The encrypted string output can be decrypted using # [`public_decrypt`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/RSA.html#method-i-public_decrypt). sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def private_encrypt(*_); end + def private_encrypt(*arg0); end # The return value is always `true` since every private key is also a public # key. @@ -6933,22 +6933,22 @@ class OpenSSL::PKey::RSA < OpenSSL::PKey::PKey # public key. *padding* defaults to PKCS1\_PADDING. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def public_decrypt(*_); end + def public_decrypt(*arg0); end # Encrypt *string* with the public key. *padding* defaults to PKCS1\_PADDING. # The encrypted string output can be decrypted using # [`private_decrypt`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/RSA.html#method-i-private_decrypt). sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def public_encrypt(*_); end + def public_encrypt(*arg0); end # Makes new [`RSA`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/RSA.html) # instance containing the public key from the private key. @@ -6972,36 +6972,36 @@ class OpenSSL::PKey::RSA < OpenSSL::PKey::PKey # respectively. sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, ) .returns(::T.untyped) end - def set_crt_params(_, _1, _2); end + def set_crt_params(arg0, arg1, arg2); end # Sets *p*, *q* for the # [`RSA`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/RSA.html) instance. sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def set_factors(_, _1); end + def set_factors(arg0, arg1); end # Sets *n*, *e*, *d* for the # [`RSA`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/RSA.html) instance. sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, ) .returns(::T.untyped) end - def set_key(_, _1, _2); end + def set_key(arg0, arg1, arg2); end # Signs *data* using the Probabilistic Signature Scheme (RSA-PSS) and returns # the calculated signature. @@ -7057,21 +7057,21 @@ class OpenSSL::PKey::RSA < OpenSSL::PKey::PKey # [`export`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/RSA.html#method-i-export) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def to_pem(*_); end + def to_pem(*arg0); end # Alias for: # [`export`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey/RSA.html#method-i-export) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def to_s(*_); end + def to_s(*arg0); end # THIS METHOD IS INSECURE, PRIVATE INFORMATION CAN LEAK OUT!!! # @@ -7089,11 +7089,11 @@ class OpenSSL::PKey::RSA < OpenSSL::PKey::PKey # 17, or 65537. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.generate(*_); end + def self.generate(*arg0); end # Verifies *data* using the Probabilistic Signature Scheme (RSA-PSS). # @@ -7140,11 +7140,11 @@ module OpenSSL::Random # Same as ::egd\_bytes but queries 255 bytes by default. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.egd(_); end + def self.egd(arg0); end # Queries the entropy gathering daemon EGD on socket path given by *filename*. # @@ -7152,21 +7152,21 @@ module OpenSSL::Random # [`OpenSSL`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL.html) built-in PRNG. sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def self.egd_bytes(_, _1); end + def self.egd_bytes(arg0, arg1); end # Reads bytes from *filename* and adds them to the PRNG. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.load_random_file(_); end + def self.load_random_file(arg0); end # Generates a [`String`](https://docs.ruby-lang.org/en/2.7.0/String.html) with # *length* number of pseudo-random bytes. @@ -7182,11 +7182,11 @@ module OpenSSL::Random # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.pseudo_bytes(_); end + def self.pseudo_bytes(arg0); end # Mixes the bytes from *str* into the Pseudo # [`Random`](https://docs.ruby-lang.org/en/2.7.0/Random.html) Number @@ -7210,12 +7210,12 @@ module OpenSSL::Random # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def self.random_add(_, _1); end + def self.random_add(arg0, arg1); end # Generates a [`String`](https://docs.ruby-lang.org/en/2.7.0/String.html) with # *length* number of cryptographically strong pseudo-random bytes. @@ -7228,20 +7228,20 @@ module OpenSSL::Random # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.random_bytes(_); end + def self.random_bytes(arg0); end # ::seed is equivalent to ::add where *entropy* is length of *str*. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.seed(_); end + def self.seed(arg0); end # Return `true` if the PRNG has been seeded with enough data, `false` # otherwise. @@ -7253,11 +7253,11 @@ module OpenSSL::Random # a later session. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.write_random_file(_); end + def self.write_random_file(arg0); end end class OpenSSL::Random::RandomError < OpenSSL::OpenSSLError @@ -7608,11 +7608,11 @@ class OpenSSL::SSL::SSLContext # Removes sessions in the internal cache that have expired at *time*. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def flush_sessions(*_); end + def flush_sessions(*arg0); end # Alias for: # [`setup`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/SSL/SSLContext.html#method-i-setup) @@ -7862,11 +7862,11 @@ class OpenSSL::SSL::SSLContext # Adds *session* to the session cache. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def session_add(_); end + def session_add(arg0); end # The current session cache mode. sig {returns(::T.untyped)} @@ -7987,11 +7987,11 @@ class OpenSSL::SSL::SSLContext # Removes *session* from the session cache. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def session_remove(_); end + def session_remove(arg0); end # A callback invoked when a session is removed from the internal cache. # @@ -8385,11 +8385,11 @@ class OpenSSL::SSL::SSLSocket # instead. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def accept_nonblock(*_); end + def accept_nonblock(*arg0); end # The X509 certificate for this socket endpoint. sig {returns(::T.untyped)} @@ -8440,11 +8440,11 @@ class OpenSSL::SSL::SSLSocket # instead. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def connect_nonblock(*_); end + def connect_nonblock(*arg0); end # The SSLContext object used in this connection. sig {returns(::T.untyped)} @@ -8465,11 +8465,11 @@ class OpenSSL::SSL::SSLSocket sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # The underlying [`IO`](https://docs.ruby-lang.org/en/2.7.0/IO.html) object. sig {returns(::T.untyped)} @@ -8565,21 +8565,21 @@ class OpenSSL::SSL::SSLSocket # a pre-allocated *buffer* is provided the data will be written into it. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def sysread(*_); end + def sysread(*arg0); end # Writes *string* to the # [`SSL`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/SSL.html) connection. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def syswrite(_); end + def syswrite(arg0); end # The underlying [`IO`](https://docs.ruby-lang.org/en/2.7.0/IO.html) object. sig {returns(::T.untyped)} @@ -8599,11 +8599,11 @@ class OpenSSL::SSL::Session # the same, `false` if not. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def ==(_); end + def ==(arg0); end # Returns the # [`Session`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/SSL/Session.html) @@ -8613,11 +8613,11 @@ class OpenSSL::SSL::Session sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(_); end + def initialize(arg0); end # Returns the time at which the session was established. sig {returns(::T.untyped)} @@ -8797,11 +8797,11 @@ end class OpenSSL::X509::Attribute sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def oid(); end @@ -8835,19 +8835,19 @@ end class OpenSSL::X509::CRL sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_extension(_); end + def add_extension(arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_revoked(_); end + def add_revoked(arg0); end # Gets X509v3 extensions as array of X509Ext objects sig {returns(::T.untyped)} @@ -8864,11 +8864,11 @@ class OpenSSL::X509::CRL sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def issuer(); end @@ -8916,12 +8916,12 @@ class OpenSSL::X509::CRL sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def sign(_, _1); end + def sign(arg0, arg1); end sig {returns(::T.untyped)} def signature_algorithm(); end @@ -8944,11 +8944,11 @@ class OpenSSL::X509::CRL sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def verify(_); end + def verify(arg0); end sig {returns(::T.untyped)} def version(); end @@ -9070,21 +9070,21 @@ end class OpenSSL::X509::Certificate sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_extension(_); end + def add_extension(arg0); end # Returns `true` if *key* is the corresponding private key to the Subject # Public Key Information, `false` otherwise. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def check_private_key(_); end + def check_private_key(arg0); end sig {returns(::T.untyped)} def extensions(); end @@ -9099,11 +9099,11 @@ class OpenSSL::X509::Certificate sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def inspect(); end @@ -9173,12 +9173,12 @@ class OpenSSL::X509::Certificate sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def sign(_, _1); end + def sign(arg0, arg1); end sig {returns(::T.untyped)} def signature_algorithm(); end @@ -9215,11 +9215,11 @@ class OpenSSL::X509::Certificate # [`OpenSSL::PKey`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/PKey.html). sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def verify(_); end + def verify(arg0); end sig {returns(::T.untyped)} def version(); end @@ -9250,11 +9250,11 @@ class OpenSSL::X509::Extension sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def oid(); end @@ -9311,11 +9311,11 @@ class OpenSSL::X509::ExtensionFactory # with passed values. See also x509v3\_config(5). sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def create_ext(*_); end + def create_ext(*arg0); end sig do params( @@ -9362,11 +9362,11 @@ class OpenSSL::X509::ExtensionFactory sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def issuer_certificate(); end @@ -9451,11 +9451,11 @@ class OpenSSL::X509::Name # [`cmp`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/X509/Name.html#method-i-cmp) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def <=>(_); end + def <=>(arg0); end # Adds a new entry with the given *oid* and *value* to this name. The *oid* is # an object identifier defined in ASN.1. Some common OIDs are: @@ -9485,11 +9485,11 @@ class OpenSSL::X509::Name # single-valued RDN to the end. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_entry(*_); end + def add_entry(*arg0); end # Compares this # [`Name`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/X509/Name.html) with @@ -9500,20 +9500,20 @@ class OpenSSL::X509::Name # [`<=>`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/X509/Name.html#method-i-3C-3D-3E) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def cmp(_); end + def cmp(arg0); end # Returns true if *name* and *other* refer to the same hash key. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def eql?(_); end + def eql?(arg0); end # The hash value returned is suitable for use as a certificate's filename in a # CA path. @@ -9527,11 +9527,11 @@ class OpenSSL::X509::Name sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig do params( @@ -9567,11 +9567,11 @@ class OpenSSL::X509::Name # used. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def to_s(*_); end + def to_s(*arg0); end # Alias for: # [`parse_openssl`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/X509/Name.html#method-c-parse_openssl) @@ -9658,11 +9658,11 @@ end class OpenSSL::X509::Request sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_attribute(_); end + def add_attribute(arg0); end sig {returns(::T.untyped)} def attributes(); end @@ -9677,11 +9677,11 @@ class OpenSSL::X509::Request sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def public_key(); end @@ -9696,12 +9696,12 @@ class OpenSSL::X509::Request sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def sign(_, _1); end + def sign(arg0, arg1); end sig {returns(::T.untyped)} def signature_algorithm(); end @@ -9736,11 +9736,11 @@ class OpenSSL::X509::Request # Checks that cert signature is made with PRIVversion of this PUBLIC 'key' sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def verify(_); end + def verify(arg0); end sig {returns(::T.untyped)} def version(); end @@ -9760,11 +9760,11 @@ end class OpenSSL::X509::Revoked sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_extension(_); end + def add_extension(arg0); end # Gets X509v3 extensions as array of X509Ext objects sig {returns(::T.untyped)} @@ -9781,11 +9781,11 @@ class OpenSSL::X509::Revoked sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end sig {returns(::T.untyped)} def serial(); end @@ -9857,42 +9857,42 @@ class OpenSSL::X509::Store # *cert* to the certificate store. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_cert(_); end + def add_cert(arg0); end # Adds the # [`OpenSSL::X509::CRL`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/X509/CRL.html) # *crl* to the store. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_crl(_); end + def add_crl(arg0); end # Adds the certificates in *file* to the certificate store. *file* is the path # to the file, and the file contains one or more certificates in PEM format # concatenated together. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_file(_); end + def add_file(arg0); end # Adds *path* as the hash dir to be looked up by the store. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def add_path(_); end + def add_path(arg0); end # The certificate chain constructed by the last call of # [`verify`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/X509/Store.html#method-i-verify). @@ -9923,11 +9923,11 @@ class OpenSSL::X509::Store sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Sets the store's purpose to *purpose*. If specified, the verifications on # the store will check every untrusted certificate's extensions are consistent @@ -9994,11 +9994,11 @@ class OpenSSL::X509::Store # [`chain`](https://docs.ruby-lang.org/en/2.7.0/OpenSSL/X509/Store.html#attribute-i-chain). sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def verify(*_); end + def verify(*arg0); end # The callback for additional certificate verification. It is invoked for each # untrusted certificate in the chain. @@ -10068,11 +10068,11 @@ class OpenSSL::X509::StoreContext sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Sets the purpose of the context. See Store#purpose=. sig do diff --git a/rbi/stdlib/psych.rbi b/rbi/stdlib/psych.rbi index 905efe38a0b..2dfe498557a 100644 --- a/rbi/stdlib/psych.rbi +++ b/rbi/stdlib/psych.rbi @@ -771,7 +771,7 @@ class Psych::Emitter < Psych::Handler # # See # [`Psych::Handler#alias`](https://docs.ruby-lang.org/en/2.7.0/Psych/Handler.html#method-i-alias) - def alias(_); end + def alias(arg0); end # Get the output style, canonical or not. def canonical(); end @@ -784,7 +784,7 @@ class Psych::Emitter < Psych::Handler # # See # [`Psych::Handler#end_document`](https://docs.ruby-lang.org/en/2.7.0/Psych/Handler.html#method-i-end_document) - def end_document(_); end + def end_document(arg0); end # Emit the end of a mapping. # @@ -811,7 +811,7 @@ class Psych::Emitter < Psych::Handler # to `level`. The level must be less than 10 and greater than 1. def indentation=(indentation); end - def initialize(*_); end + def initialize(*arg0); end # Get the preferred line width. def line_width(); end @@ -825,7 +825,7 @@ class Psych::Emitter < Psych::Handler # # See # [`Psych::Handler#scalar`](https://docs.ruby-lang.org/en/2.7.0/Psych/Handler.html#method-i-scalar) - def scalar(_, _1, _2, _3, _4, _5); end + def scalar(arg0, arg1, arg2, arg3, arg4, arg5); end # Start a document emission with # [`YAML`](https://docs.ruby-lang.org/en/2.7.0/YAML.html) `version`, `tags`, @@ -833,27 +833,27 @@ class Psych::Emitter < Psych::Handler # # See # [`Psych::Handler#start_document`](https://docs.ruby-lang.org/en/2.7.0/Psych/Handler.html#method-i-start_document) - def start_document(_, _1, _2); end + def start_document(arg0, arg1, arg2); end # Start emitting a [`YAML`](https://docs.ruby-lang.org/en/2.7.0/YAML.html) map # with `anchor`, `tag`, an `implicit` start and end, and `style`. # # See # [`Psych::Handler#start_mapping`](https://docs.ruby-lang.org/en/2.7.0/Psych/Handler.html#method-i-start_mapping) - def start_mapping(_, _1, _2, _3); end + def start_mapping(arg0, arg1, arg2, arg3); end # Start emitting a sequence with `anchor`, a `tag`, `implicit` sequence start # and end, along with `style`. # # See # [`Psych::Handler#start_sequence`](https://docs.ruby-lang.org/en/2.7.0/Psych/Handler.html#method-i-start_sequence) - def start_sequence(_, _1, _2, _3); end + def start_sequence(arg0, arg1, arg2, arg3); end # Start a stream emission with `encoding` # # See # [`Psych::Handler#start_stream`](https://docs.ruby-lang.org/en/2.7.0/Psych/Handler.html#method-i-start_stream) - def start_stream(_); end + def start_stream(arg0); end end # [`Psych::Handler`](https://docs.ruby-lang.org/en/2.7.0/Psych/Handler.html) is @@ -1743,22 +1743,22 @@ class Psych::Parser # See [`Psych::Parser`](https://docs.ruby-lang.org/en/2.7.0/Psych/Parser.html) # and # [`Psych::Parser#handler`](https://docs.ruby-lang.org/en/2.7.0/Psych/Parser.html#attribute-i-handler) - def parse(*_); end + def parse(*arg0); end end class Psych::Parser::Mark def column(); end - def column=(_); end + def column=(arg0); end def index(); end - def index=(_); end + def index=(arg0); end def line(); end - def line=(_); end + def line=(arg0); end end # Scan scalars for built in types diff --git a/rbi/stdlib/socket.rbi b/rbi/stdlib/socket.rbi index 0c806dce2e9..dac821bdb93 100644 --- a/rbi/stdlib/socket.rbi +++ b/rbi/stdlib/socket.rbi @@ -172,19 +172,19 @@ class Addrinfo < Data # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def getnameinfo(*_); end + def getnameinfo(*arg0); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # returns a string which shows addrinfo in human-readable form. # @@ -369,11 +369,11 @@ class Addrinfo < Data sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def marshal_load(_); end + def marshal_load(arg0); end # returns the protocol family as an integer. # @@ -503,11 +503,11 @@ class Addrinfo < Data # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.getaddrinfo(*_); end + def self.getaddrinfo(*arg0); end # returns an addrinfo object for IP address. # @@ -519,11 +519,11 @@ class Addrinfo < Data # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.ip(_); end + def self.ip(arg0); end # returns an addrinfo object for TCP address. # @@ -532,12 +532,12 @@ class Addrinfo < Data # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def self.tcp(_, _1); end + def self.tcp(arg0, arg1); end # returns an addrinfo object for UDP address. # @@ -546,12 +546,12 @@ class Addrinfo < Data # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def self.udp(_, _1); end + def self.udp(arg0, arg1); end # returns an addrinfo object for UNIX socket address. # @@ -563,11 +563,11 @@ class Addrinfo < Data # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.unix(*_); end + def self.unix(*arg0); end end # [`BasicSocket`](https://docs.ruby-lang.org/en/2.7.0/BasicSocket.html) is the @@ -784,12 +784,12 @@ class BasicSocket < IO # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def getsockopt(_, _1); end + def getsockopt(arg0, arg1); end # Returns an [`Addrinfo`](https://docs.ruby-lang.org/en/2.7.0/Addrinfo.html) # object for local address obtained by getsockname. @@ -828,11 +828,11 @@ class BasicSocket < IO # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def recv(*_); end + def recv(*arg0); end # Receives up to *maxlen* bytes from `socket` using recvfrom(2) after # O\_NONBLOCK is set for the underlying file descriptor. *flags* is zero or @@ -1031,11 +1031,11 @@ class BasicSocket < IO # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def send(*_); end + def send(*arg0); end # sendmsg sends a message using sendmsg(2) system call in blocking manner. # @@ -1174,11 +1174,11 @@ class BasicSocket < IO # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def setsockopt(*_); end + def setsockopt(*arg0); end # Calls shutdown(2) system call. # @@ -1209,11 +1209,11 @@ class BasicSocket < IO # } sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def shutdown(*_); end + def shutdown(*arg0); end # Gets the global # [`do_not_reverse_lookup`](https://docs.ruby-lang.org/en/2.7.0/BasicSocket.html#method-c-do_not_reverse_lookup) @@ -1258,11 +1258,11 @@ class BasicSocket < IO # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.for_fd(_); end + def self.for_fd(arg0); end end # [`IPSocket`](https://docs.ruby-lang.org/en/2.7.0/IPSocket.html) is the super @@ -1291,11 +1291,11 @@ class IPSocket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def addr(*_); end + def addr(*arg0); end # Returns the remote address as an array which contains address\_family, port, # hostname and numeric\_address. It is defined for connection oriented socket @@ -1317,11 +1317,11 @@ class IPSocket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def peeraddr(*_); end + def peeraddr(*arg0); end # Receives a message and return the message as a string and an address which # the message come from. @@ -1341,11 +1341,11 @@ class IPSocket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def recvfrom(*_); end + def recvfrom(*arg0); end # Lookups the IP address of *host*. # @@ -1361,11 +1361,11 @@ class IPSocket < BasicSocket # [`getaddress_orig`](https://docs.ruby-lang.org/en/2.7.0/IPSocket.html#method-c-getaddress_orig) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.getaddress(_); end + def self.getaddress(arg0); end end # [`Class`](https://docs.ruby-lang.org/en/2.7.0/Class.html) `Socket` provides @@ -2264,11 +2264,11 @@ class Socket < BasicSocket # * bind function in Microsoft's Winsock functions reference sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def bind(_); end + def bind(arg0); end # Requests a connection to be made on the given `remote_sockaddr`. Returns 0 # if successful, otherwise an exception is raised. @@ -2392,11 +2392,11 @@ class Socket < BasicSocket # * connect function in Microsoft's Winsock functions reference sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def connect(_); end + def connect(arg0); end # Requests a connection to be made on the given `remote_sockaddr` after # O\_NONBLOCK is set for the underlying file descriptor. Returns 0 if @@ -2467,11 +2467,11 @@ class Socket < BasicSocket sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # enable the socket option # [`IPV6_V6ONLY`](https://docs.ruby-lang.org/en/2.7.0/Socket.html#IPV6_V6ONLY) @@ -2559,11 +2559,11 @@ class Socket < BasicSocket # * listen function in Microsoft's Winsock functions reference sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def listen(_); end + def listen(arg0); end # Receives up to *maxlen* bytes from `socket`. *flags* is zero or more of the # `MSG_` options. The first element of the results, *mesg*, is the data @@ -2682,11 +2682,11 @@ class Socket < BasicSocket # operation resulted in an ICMP Port Unreachable message. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def recvfrom(*_); end + def recvfrom(*arg0); end # Receives up to *maxlen* bytes from `socket` using recvfrom(2) after # O\_NONBLOCK is set for the underlying file descriptor. *flags* is zero or @@ -2871,11 +2871,11 @@ class Socket < BasicSocket # [`Addrinfo.getaddrinfo`](https://docs.ruby-lang.org/en/2.7.0/Addrinfo.html#method-c-getaddrinfo). sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.getaddrinfo(*_); end + def self.getaddrinfo(*arg0); end # Use # [`Addrinfo#getnameinfo`](https://docs.ruby-lang.org/en/2.7.0/Addrinfo.html#method-i-getnameinfo) @@ -2902,11 +2902,11 @@ class Socket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.gethostbyaddr(*_); end + def self.gethostbyaddr(*arg0); end # Use # [`Addrinfo.getaddrinfo`](https://docs.ruby-lang.org/en/2.7.0/Addrinfo.html#method-c-getaddrinfo) @@ -2929,11 +2929,11 @@ class Socket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.gethostbyname(_); end + def self.gethostbyname(arg0); end # Returns the hostname. # @@ -3020,11 +3020,11 @@ class Socket < BasicSocket # [`Addrinfo#getnameinfo`](https://docs.ruby-lang.org/en/2.7.0/Addrinfo.html#method-i-getnameinfo). sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.getnameinfo(*_); end + def self.getnameinfo(*arg0); end # Obtains the port number for *service\_name*. # @@ -3037,11 +3037,11 @@ class Socket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.getservbyname(*_); end + def self.getservbyname(*arg0); end # Obtains the port number for *port*. # @@ -3054,11 +3054,11 @@ class Socket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.getservbyport(*_); end + def self.getservbyport(*arg0); end # Returns local IP addresses as an array. # @@ -3086,12 +3086,12 @@ class Socket < BasicSocket # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def self.pack_sockaddr_in(_, _1); end + def self.pack_sockaddr_in(arg0, arg1); end # Packs *path* as an # [`AF_UNIX`](https://docs.ruby-lang.org/en/2.7.0/Socket.html#AF_UNIX) @@ -3102,11 +3102,11 @@ class Socket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.pack_sockaddr_un(_); end + def self.pack_sockaddr_un(arg0); end # Creates a pair of sockets connected each other. # @@ -3135,11 +3135,11 @@ class Socket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.pair(*_); end + def self.pair(*arg0); end # Packs *port* and *host* as an AF\_INET/AF\_INET6 sockaddr string. # @@ -3152,12 +3152,12 @@ class Socket < BasicSocket # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def self.sockaddr_in(_, _1); end + def self.sockaddr_in(arg0, arg1); end # Packs *path* as an # [`AF_UNIX`](https://docs.ruby-lang.org/en/2.7.0/Socket.html#AF_UNIX) @@ -3168,11 +3168,11 @@ class Socket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.sockaddr_un(_); end + def self.sockaddr_un(arg0); end # Creates a pair of sockets connected each other. # @@ -3201,11 +3201,11 @@ class Socket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.socketpair(*_); end + def self.socketpair(*arg0); end # creates a new socket object connected to host:port using TCP/IP. # @@ -3540,11 +3540,11 @@ class Socket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.unpack_sockaddr_in(_); end + def self.unpack_sockaddr_in(arg0); end # Unpacks *sockaddr* into path. # @@ -3557,11 +3557,11 @@ class Socket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.unpack_sockaddr_un(_); end + def self.unpack_sockaddr_un(arg0); end end # [`Socket::AncillaryData`](https://docs.ruby-lang.org/en/2.7.0/Socket/AncillaryData.html) @@ -3586,12 +3586,12 @@ class Socket::AncillaryData # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def cmsg_is?(_, _1); end + def cmsg_is?(arg0, arg1); end # returns the cmsg data as a string. # @@ -3613,14 +3613,14 @@ class Socket::AncillaryData sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, - _3: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, + arg3: ::T.untyped, ) .returns(::T.untyped) end - def initialize(_, _1, _2, _3); end + def initialize(arg0, arg1, arg2, arg3); end # returns a string which shows ancillarydata in human-readable form. # @@ -3792,14 +3792,14 @@ class Socket::AncillaryData # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, - _3: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, + arg3: ::T.untyped, ) .returns(::T.untyped) end - def self.int(_, _1, _2, _3); end + def self.int(arg0, arg1, arg2, arg3); end # Returns new ancillary data for IP\_PKTINFO. # @@ -3818,11 +3818,11 @@ class Socket::AncillaryData # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.ip_pktinfo(*_); end + def self.ip_pktinfo(*arg0); end # Returns new ancillary data for IPV6\_PKTINFO. # @@ -3836,12 +3836,12 @@ class Socket::AncillaryData # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def self.ipv6_pktinfo(_, _1); end + def self.ipv6_pktinfo(arg0, arg1); end # Creates a new # [`Socket::AncillaryData`](https://docs.ruby-lang.org/en/2.7.0/Socket/AncillaryData.html) @@ -3853,11 +3853,11 @@ class Socket::AncillaryData # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.unix_rights(*_); end + def self.unix_rights(*arg0); end end # [`Socket::Constants`](https://docs.ruby-lang.org/en/2.7.0/Socket/Constants.html) @@ -4535,14 +4535,14 @@ class Socket::Option sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, - _3: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, + arg3: ::T.untyped, ) .returns(::T.untyped) end - def initialize(_, _1, _2, _3); end + def initialize(arg0, arg1, arg2, arg3); end # Returns a string which shows sockopt in human-readable form. # @@ -4633,11 +4633,11 @@ class Socket::Option # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def unpack(_); end + def unpack(arg0); end # Creates a new # [`Socket::Option`](https://docs.ruby-lang.org/en/2.7.0/Socket/Option.html) @@ -4654,14 +4654,14 @@ class Socket::Option # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, - _3: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, + arg3: ::T.untyped, ) .returns(::T.untyped) end - def self.bool(_, _1, _2, _3); end + def self.bool(arg0, arg1, arg2, arg3); end # Creates a new # [`Socket::Option`](https://docs.ruby-lang.org/en/2.7.0/Socket/Option.html) @@ -4673,14 +4673,14 @@ class Socket::Option # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, - _3: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, + arg3: ::T.untyped, ) .returns(::T.untyped) end - def self.byte(_, _1, _2, _3); end + def self.byte(arg0, arg1, arg2, arg3); end # Creates a new # [`Socket::Option`](https://docs.ruby-lang.org/en/2.7.0/Socket/Option.html) @@ -4694,14 +4694,14 @@ class Socket::Option # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, - _2: ::T.untyped, - _3: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, + arg2: ::T.untyped, + arg3: ::T.untyped, ) .returns(::T.untyped) end - def self.int(_, _1, _2, _3); end + def self.int(arg0, arg1, arg2, arg3); end # Creates a new # [`Socket::Option`](https://docs.ruby-lang.org/en/2.7.0/Socket/Option.html) @@ -4718,11 +4718,11 @@ class Socket::Option # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.ipv4_multicast_loop(_); end + def self.ipv4_multicast_loop(arg0); end # Creates a new # [`Socket::Option`](https://docs.ruby-lang.org/en/2.7.0/Socket/Option.html) @@ -4736,11 +4736,11 @@ class Socket::Option # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.ipv4_multicast_ttl(_); end + def self.ipv4_multicast_ttl(arg0); end # Creates a new # [`Socket::Option`](https://docs.ruby-lang.org/en/2.7.0/Socket/Option.html) @@ -4756,12 +4756,12 @@ class Socket::Option # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def self.linger(_, _1); end + def self.linger(arg0, arg1); end end # [`SocketError`](https://docs.ruby-lang.org/en/2.7.0/SocketError.html) is the @@ -4911,11 +4911,11 @@ class TCPServer < TCPSocket sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Listens for connections, using the specified `int` as the backlog. A call to # *listen* only applies if the `socket` is of type SOCK\_STREAM or @@ -4993,11 +4993,11 @@ class TCPServer < TCPSocket # * listen function in Microsoft's Winsock functions reference sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def listen(_); end + def listen(arg0); end # Returns a file descriptor of a accepted connection. # @@ -5090,11 +5090,11 @@ class TCPSocket < IPSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.gethostbyname(_); end + def self.gethostbyname(arg0); end sig {returns(::T.untyped)} def self.socks_ignores(); end @@ -5179,12 +5179,12 @@ class UDPSocket < IPSocket # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def bind(_, _1); end + def bind(arg0, arg1); end # Connects *udpsocket* to *host*:*port*. # @@ -5200,20 +5200,20 @@ class UDPSocket < IPSocket # ``` sig do params( - _: ::T.untyped, - _1: ::T.untyped, + arg0: ::T.untyped, + arg1: ::T.untyped, ) .returns(::T.untyped) end - def connect(_, _1); end + def connect(arg0, arg1); end sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(*_); end + def initialize(*arg0); end # Receives up to *maxlen* bytes from `udpsocket` using recvfrom(2) after # O\_NONBLOCK is set for the underlying file descriptor. *flags* is zero or @@ -5305,11 +5305,11 @@ class UDPSocket < IPSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def send(*_); end + def send(*arg0); end end # [`UNIXServer`](https://docs.ruby-lang.org/en/2.7.0/UNIXServer.html) represents @@ -5391,11 +5391,11 @@ class UNIXServer < UNIXSocket sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(_); end + def initialize(arg0); end # Listens for connections, using the specified `int` as the backlog. A call to # *listen* only applies if the `socket` is of type SOCK\_STREAM or @@ -5473,11 +5473,11 @@ class UNIXServer < UNIXSocket # * listen function in Microsoft's Winsock functions reference sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def listen(_); end + def listen(arg0); end # Accepts a new connection. It returns the new file descriptor which is an # integer. @@ -5517,11 +5517,11 @@ class UNIXSocket < BasicSocket sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def initialize(_); end + def initialize(arg0); end # Returns the path of the local address of unixsocket. # @@ -5572,11 +5572,11 @@ class UNIXSocket < BasicSocket # [`IO.for_fd`](https://docs.ruby-lang.org/en/2.7.0/IO.html#method-c-for_fd) sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def recv_io(*_); end + def recv_io(*arg0); end # Receives a message via *unixsocket*. # @@ -5602,11 +5602,11 @@ class UNIXSocket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def recvfrom(*_); end + def recvfrom(*arg0); end # Sends *io* as file descriptor passing. # @@ -5626,11 +5626,11 @@ class UNIXSocket < BasicSocket # object or integer file descriptor. sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def send_io(_); end + def send_io(arg0); end # Creates a pair of sockets connected to each other. # @@ -5647,11 +5647,11 @@ class UNIXSocket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.pair(*_); end + def self.pair(*arg0); end # Creates a pair of sockets connected to each other. # @@ -5668,9 +5668,9 @@ class UNIXSocket < BasicSocket # ``` sig do params( - _: ::T.untyped, + arg0: ::T.untyped, ) .returns(::T.untyped) end - def self.socketpair(*_); end + def self.socketpair(*arg0); end end diff --git a/test/testdata/infer/overloads_test.rb b/test/testdata/infer/overloads_test.rb index 98c8e7680fe..fb32544dcf3 100644 --- a/test/testdata/infer/overloads_test.rb +++ b/test/testdata/infer/overloads_test.rb @@ -16,25 +16,25 @@ def make_untyped end sig do params( - _: String, + arg0: String, ) .returns(String) end sig do params( - _: Exception, + arg0: Exception, ) .returns(NilClass) end sig do params( - _: Class, - _1: String, - _2: T::Array[String], + arg0: Class, + arg1: String, + arg2: T::Array[String], ) .returns(Symbol) end - def overloaded(_, _1=_, _2=_); + def overloaded(arg0, arg1=arg0, arg2=arg0); make_untyped end @@ -64,11 +64,11 @@ class OverloadAndGenerics extend T::Sig Elem = type_member - def _; end + def arg0; end sig {params(x: Elem).returns(Elem)} sig {params(x: String).returns(String)} - def overloaded(x); _; end + def overloaded(x); arg0; end end class Foo @@ -78,10 +78,10 @@ def test T.assert_type!(h.overloaded("s"), String) T.assert_type!(h.overloaded(Exception.new), NilClass) T.assert_type!(h.overloaded(self.class), Symbol) - h.overloaded(1) # error: Expected `String` but found `Integer(1)` for argument `_` + h.overloaded(1) # error: Expected `String` but found `Integer(1)` for argument `arg0` # should ask for string - h.overloaded("1", 2) # error: Expected `Class` but found `String("1")` for argument `_` - # ^ error: Expected `String` but found `Integer(2)` for argument `_1` + h.overloaded("1", 2) # error: Expected `Class` but found `String("1")` for argument `arg0` + # ^ error: Expected `String` but found `Integer(2)` for argument `arg1` g = OverloadAndGenerics[Integer].new T.assert_type!(g.overloaded("hi"), String) diff --git a/test/whitequark/test_assignment_to_numparams_0.rb b/test/whitequark/test_assignment_to_numparams_0.rb index cec3671b371..e6bffe70ab2 100644 --- a/test/whitequark/test_assignment_to_numparams_0.rb +++ b/test/whitequark/test_assignment_to_numparams_0.rb @@ -1,4 +1,4 @@ # typed: true proc {_1 = nil} - # ^^ error: cannot assign to numbered parameter _1 + # ^^ error: _1 is reserved for numbered parameter diff --git a/test/whitequark/test_assignment_to_numparams_1.rb b/test/whitequark/test_assignment_to_numparams_1.rb index 95ae9d61cfb..4abfe3d7069 100644 --- a/test/whitequark/test_assignment_to_numparams_1.rb +++ b/test/whitequark/test_assignment_to_numparams_1.rb @@ -1,3 +1,3 @@ # typed: true -proc {_1; _1 = nil} # error: cannot assign to numbered parameter _1 +proc {_1; _1 = nil} # error: _1 is reserved for numbered parameter diff --git a/test/whitequark/test_assignment_to_numparams_2.rb b/test/whitequark/test_assignment_to_numparams_2.rb index 98683efccdc..a90817e5d09 100644 --- a/test/whitequark/test_assignment_to_numparams_2.rb +++ b/test/whitequark/test_assignment_to_numparams_2.rb @@ -1,4 +1,4 @@ # typed: true -proc {_1; _1, foo = [nil, nil]} # error: cannot assign to numbered parameter _1 +proc {_1; _1, foo = [nil, nil]} # error: _1 is reserved for numbered parameter # ^ error: unexpected token tRCURLY diff --git a/test/whitequark/test_assignment_to_numparams_3.rb b/test/whitequark/test_assignment_to_numparams_3.rb index f3f7989e96d..99a550b4b42 100644 --- a/test/whitequark/test_assignment_to_numparams_3.rb +++ b/test/whitequark/test_assignment_to_numparams_3.rb @@ -1,3 +1,3 @@ # typed: true -proc {_9; _1 = nil} # error: cannot assign to numbered parameter _1 +proc {_9; _1 = nil} # error: _1 is reserved for numbered parameter diff --git a/test/whitequark/test_assignment_to_numparams_4.rb b/test/whitequark/test_assignment_to_numparams_4.rb index f574a99fc6f..5f69d8b350f 100644 --- a/test/whitequark/test_assignment_to_numparams_4.rb +++ b/test/whitequark/test_assignment_to_numparams_4.rb @@ -1,3 +1,3 @@ # typed: true -proc {_1; _9 = nil} # error: cannot assign to numbered parameter _9 +proc {_1; _9 = nil} # error: _9 is reserved for numbered parameter diff --git a/test/whitequark/test_assignment_to_numparams_5.rb b/test/whitequark/test_assignment_to_numparams_5.rb index 77a986f0cb2..42419dec8b3 100644 --- a/test/whitequark/test_assignment_to_numparams_5.rb +++ b/test/whitequark/test_assignment_to_numparams_5.rb @@ -1,4 +1,4 @@ # typed: true -_1 = true +_1 = true # error: _1 is reserved for numbered parameter puts _1 diff --git a/test/whitequark/test_reserved_for_numparam_before_30_0.parse-tree-whitequark.exp b/test/whitequark/test_reserved_for_numparam_before_30_0.parse-tree-whitequark.exp deleted file mode 100644 index 77a5f99d91d..00000000000 --- a/test/whitequark/test_reserved_for_numparam_before_30_0.parse-tree-whitequark.exp +++ /dev/null @@ -1 +0,0 @@ -s(:nil) diff --git a/test/whitequark/test_reserved_for_numparam_before_30_0.rb b/test/whitequark/test_reserved_for_numparam_before_30_0.rb deleted file mode 100644 index eb1590686f3..00000000000 --- a/test/whitequark/test_reserved_for_numparam_before_30_0.rb +++ /dev/null @@ -1,3 +0,0 @@ -# typed: true - -proc {_1 = nil} # error: cannot assign to numbered parameter _1 diff --git a/test/whitequark/test_reserved_for_numparam_before_30_1.parse-tree-whitequark.exp b/test/whitequark/test_reserved_for_numparam_before_30_1.parse-tree-whitequark.exp deleted file mode 100644 index f3d78a68716..00000000000 --- a/test/whitequark/test_reserved_for_numparam_before_30_1.parse-tree-whitequark.exp +++ /dev/null @@ -1,3 +0,0 @@ -s(:assign, - s(:lvasgn, :_2), - s(:int, "1")) diff --git a/test/whitequark/test_reserved_for_numparam_before_30_1.rb b/test/whitequark/test_reserved_for_numparam_before_30_1.rb deleted file mode 100644 index c0dceb3876e..00000000000 --- a/test/whitequark/test_reserved_for_numparam_before_30_1.rb +++ /dev/null @@ -1,3 +0,0 @@ -# typed: true - -_2 = 1 diff --git a/test/whitequark/test_reserved_for_numparam_before_30_2.parse-tree-whitequark.exp b/test/whitequark/test_reserved_for_numparam_before_30_2.parse-tree-whitequark.exp deleted file mode 100644 index 7fe9c203497..00000000000 --- a/test/whitequark/test_reserved_for_numparam_before_30_2.parse-tree-whitequark.exp +++ /dev/null @@ -1,4 +0,0 @@ -s(:block, - s(:send, nil, :proc), - s(:args, - s(:arg, :_3)), nil) diff --git a/test/whitequark/test_reserved_for_numparam_before_30_2.rb b/test/whitequark/test_reserved_for_numparam_before_30_2.rb deleted file mode 100644 index cd6ebc92416..00000000000 --- a/test/whitequark/test_reserved_for_numparam_before_30_2.rb +++ /dev/null @@ -1,3 +0,0 @@ -# typed: true - -proc {|_3|} diff --git a/test/whitequark/test_reserved_for_numparam_before_30_3.parse-tree-whitequark.exp b/test/whitequark/test_reserved_for_numparam_before_30_3.parse-tree-whitequark.exp deleted file mode 100644 index 5635b7d7734..00000000000 --- a/test/whitequark/test_reserved_for_numparam_before_30_3.parse-tree-whitequark.exp +++ /dev/null @@ -1,3 +0,0 @@ -s(:def, :x, - s(:args, - s(:arg, :_4)), nil) diff --git a/test/whitequark/test_reserved_for_numparam_before_30_3.rb b/test/whitequark/test_reserved_for_numparam_before_30_3.rb deleted file mode 100644 index 0bf8a48d133..00000000000 --- a/test/whitequark/test_reserved_for_numparam_before_30_3.rb +++ /dev/null @@ -1,3 +0,0 @@ -# typed: true - -def x(_4) end diff --git a/test/whitequark/test_reserved_for_numparam_before_30_4.parse-tree-whitequark.exp b/test/whitequark/test_reserved_for_numparam_before_30_4.parse-tree-whitequark.exp deleted file mode 100644 index 00634f70201..00000000000 --- a/test/whitequark/test_reserved_for_numparam_before_30_4.parse-tree-whitequark.exp +++ /dev/null @@ -1 +0,0 @@ -s(:def, :_5, nil, nil) diff --git a/test/whitequark/test_reserved_for_numparam_before_30_4.rb b/test/whitequark/test_reserved_for_numparam_before_30_4.rb deleted file mode 100644 index 8b21754f76b..00000000000 --- a/test/whitequark/test_reserved_for_numparam_before_30_4.rb +++ /dev/null @@ -1,3 +0,0 @@ -# typed: true - -def _5; end diff --git a/test/whitequark/test_reserved_for_numparam_before_30_5.parse-tree-whitequark.exp b/test/whitequark/test_reserved_for_numparam_before_30_5.parse-tree-whitequark.exp deleted file mode 100644 index 6af72694043..00000000000 --- a/test/whitequark/test_reserved_for_numparam_before_30_5.parse-tree-whitequark.exp +++ /dev/null @@ -1,2 +0,0 @@ -s(:defs, - s(:self), :_6, nil, nil) diff --git a/test/whitequark/test_reserved_for_numparam_before_30_5.rb b/test/whitequark/test_reserved_for_numparam_before_30_5.rb deleted file mode 100644 index 417ae5a5558..00000000000 --- a/test/whitequark/test_reserved_for_numparam_before_30_5.rb +++ /dev/null @@ -1,3 +0,0 @@ -# typed: true - -def self._6; end diff --git a/test/whitequark/test_reserved_for_numparam_since_30_0.rb b/test/whitequark/test_reserved_for_numparam_since_30_0.rb new file mode 100644 index 00000000000..d4577e59db9 --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_0.rb @@ -0,0 +1,3 @@ +# typed: true + +proc {_1 = nil} # error: _1 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_1.rb b/test/whitequark/test_reserved_for_numparam_since_30_1.rb new file mode 100644 index 00000000000..82cb6f701e5 --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_1.rb @@ -0,0 +1,3 @@ +# typed: true + +_2 = 1 # error: _2 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_10.rb b/test/whitequark/test_reserved_for_numparam_since_30_10.rb new file mode 100644 index 00000000000..7d5839a8c26 --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_10.rb @@ -0,0 +1,3 @@ +# typed: true + +proc {|&_3|} # error: _3 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_11.rb b/test/whitequark/test_reserved_for_numparam_since_30_11.rb new file mode 100644 index 00000000000..c0622bc9701 --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_11.rb @@ -0,0 +1,3 @@ +# typed: true + +proc {|;_3|} # error: _3 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_12.rb b/test/whitequark/test_reserved_for_numparam_since_30_12.rb new file mode 100644 index 00000000000..b0f057a3f62 --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_12.rb @@ -0,0 +1,3 @@ +# typed: true + +def _5; end # error: _5 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_13.rb b/test/whitequark/test_reserved_for_numparam_since_30_13.rb new file mode 100644 index 00000000000..5fca3b72840 --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_13.rb @@ -0,0 +1,3 @@ +# typed: true + +def self._5; end # error: _5 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_2.rb b/test/whitequark/test_reserved_for_numparam_since_30_2.rb new file mode 100644 index 00000000000..20ff43b0e47 --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_2.rb @@ -0,0 +1,3 @@ +# typed: true + +proc {|_3|} # error: _3 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_3.rb b/test/whitequark/test_reserved_for_numparam_since_30_3.rb new file mode 100644 index 00000000000..24780f696d3 --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_3.rb @@ -0,0 +1,3 @@ +# typed: true + +proc {|_3,|} # error: _3 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_4.rb b/test/whitequark/test_reserved_for_numparam_since_30_4.rb new file mode 100644 index 00000000000..591dc97f23f --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_4.rb @@ -0,0 +1,3 @@ +# typed: true + +proc {|_3 = 42|} # error: _3 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_5.rb b/test/whitequark/test_reserved_for_numparam_since_30_5.rb new file mode 100644 index 00000000000..d77164d77f2 --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_5.rb @@ -0,0 +1,3 @@ +# typed: true + +proc {|(_3)|} # error: _3 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_6.rb b/test/whitequark/test_reserved_for_numparam_since_30_6.rb new file mode 100644 index 00000000000..9966772a0e1 --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_6.rb @@ -0,0 +1,3 @@ +# typed: true + +proc {|*_3|} # error: _3 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_7.rb b/test/whitequark/test_reserved_for_numparam_since_30_7.rb new file mode 100644 index 00000000000..e3f864ecb39 --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_7.rb @@ -0,0 +1,3 @@ +# typed: true + +proc {|_3:|} # error: _3 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_8.rb b/test/whitequark/test_reserved_for_numparam_since_30_8.rb new file mode 100644 index 00000000000..6d5400e78ca --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_8.rb @@ -0,0 +1,3 @@ +# typed: true + +proc {|_3: 42|} # error: _3 is reserved for numbered parameter diff --git a/test/whitequark/test_reserved_for_numparam_since_30_9.rb b/test/whitequark/test_reserved_for_numparam_since_30_9.rb new file mode 100644 index 00000000000..6df9439975c --- /dev/null +++ b/test/whitequark/test_reserved_for_numparam_since_30_9.rb @@ -0,0 +1,3 @@ +# typed: true + +proc {|**_3|} # error: _3 is reserved for numbered parameter diff --git a/third_party/parser/codegen/generate_diagnostics.cc b/third_party/parser/codegen/generate_diagnostics.cc index cdfc5cd714e..327d6e6b372 100644 --- a/third_party/parser/codegen/generate_diagnostics.cc +++ b/third_party/parser/codegen/generate_diagnostics.cc @@ -58,7 +58,7 @@ tuple MESSAGES[] = { {"InvalidRegexp", "{}"}, {"InvalidReturn", "invalid return in class/module body"}, {"CSendInLHSOfMAsgn", "&. inside multiple assignment destination"}, - {"CantAssignToNumparam", "cannot assign to numbered parameter {}"}, + {"ReservedForNumparam", "{} is reserved for numbered parameter"}, {"OrdinaryParamDefined", "can't use numbered params when ordinary params were also defined"}, {"NumparamUsedInOuterScope", "numbered parameter is already used in an outer scope"}, {"CircularArgumentReference", "circular argument reference {}"},