lib/raap/cli.rb in raap-0.8.0 vs lib/raap/cli.rb in raap-0.9.0

- old
+ new

@@ -50,10 +50,12 @@ @results = [] end def load OptionParser.new do |o| + o.version = RaaP::VERSION + o.on('-I', '--include PATH') do |path| RaaP::RBS.loader.add(path: Pathname(path)) end o.on('--library lib', 'load rbs library') do |lib| RaaP::RBS.loader.add(library: lib, version: nil) @@ -221,11 +223,11 @@ type_name = type.name.absolute! type_args = type.args definition = RBS.builder.build_singleton(type_name) - type_params_decl = definition.type_params_decl + type_params_decl = definition.type_params_decl.freeze definition.methods.each do |method_name, method| if @skip.include?("#{type_name.absolute!}.#{method_name}") RaaP.logger.info("Skip #{"#{type_name.absolute!}.#{method_name}"}") next end @@ -241,10 +243,10 @@ end } end definition = RBS.builder.build_instance(type_name) - type_params_decl = definition.type_params_decl + type_params_decl = definition.type_params_decl.freeze definition.methods.each do |method_name, method| if @skip.include?("#{type_name.absolute!}##{method_name}") RaaP.logger.info("Skip #{"#{type_name.absolute!}.#{method_name}"}") next end