@@ -554,11 +554,11 @@ def run_prototype(args, options)
554554 when "rbi" , "rb"
555555 run_prototype_file ( format , args )
556556 when "runtime"
557- require_libs = [ ]
558- relative_libs = [ ]
557+ require_libs = [ ] #: Array[String]
558+ relative_libs = [ ] #: Array[String]
559559 merge = false
560560 todo = false
561- owners_included = [ ]
561+ owners_included = [ ] #: Array[Symbol]
562562 outline = false
563563 autoload = false
564564
@@ -591,7 +591,7 @@ def run_prototype(args, options)
591591 todo = true
592592 end
593593 opts . on ( "--method-owner CLASS" , "Generate method prototypes if the owner of the method is [CLASS]" ) do |klass |
594- owners_included << klass
594+ owners_included << klass . to_sym
595595 end
596596 opts . on ( "--outline" , "Generates only module/class/constant declaration (no method definition)" ) do
597597 outline = true
@@ -615,9 +615,9 @@ def autoload(name, path)
615615 ::Module . prepend ( hook )
616616 ::Kernel . prepend ( hook )
617617
618- arguments = [ ]
618+ arguments = [ ] #: Array[[Module, interned]]
619619 TracePoint . new ( :call ) do |tp |
620- base = tp . self . kind_of? ( Module ) ? tp . self : Kernel
620+ base = tp . self . kind_of? ( Module ) ? tp . self : Kernel #: Module
621621 name = ( tp . binding or raise ) . local_variable_get ( :name )
622622 arguments << [ base , name ]
623623 end . enable ( target : hook . instance_method ( :autoload ) , &block )
@@ -979,7 +979,7 @@ def run_annotate(args, options)
979979 end
980980
981981 def test_opt options
982- opts = [ ]
982+ opts = [ ] #: Array[String]
983983
984984 opts . push ( *options . repos . map { |dir | "--repo #{ Shellwords . escape ( dir ) } " } )
985985 opts . push ( *options . dirs . map { |dir | "-I #{ Shellwords . escape ( dir ) } " } )
@@ -1056,7 +1056,7 @@ def run_collection(args, options)
10561056 require 'bundler'
10571057
10581058 opts = collection_options ( args )
1059- params = { }
1059+ params = { } #: Hash[Symbol, untyped]
10601060 opts . order args . drop ( 1 ) , into : params
10611061 config_path = options . config_path or raise
10621062 lock_path = Collection ::Config . to_lockfile_path ( config_path )
0 commit comments