@@ -272,7 +272,7 @@ def dsl_rbi_filename(constant_name)
272272 @outpath / "#{ underscore ( constant_name ) } .rbi"
273273 end
274274
275- #: (tmp_dir: Pathname) -> Hash[String , Symbol]
275+ #: (tmp_dir: Pathname) -> Hash[Pathname , Symbol]
276276 def verify_dsl_rbi ( tmp_dir :)
277277 diff = { }
278278
@@ -304,7 +304,7 @@ def verify_dsl_rbi(tmp_dir:)
304304 diff
305305 end
306306
307- #: (Symbol cause, Array[String ] files) -> String
307+ #: (Symbol cause, Array[Pathname ] files) -> String
308308 def build_error_for_files ( cause , files )
309309 filenames = files . map do |file |
310310 @outpath / file
@@ -313,7 +313,7 @@ def build_error_for_files(cause, files)
313313 " File(s) #{ cause } :\n - #{ filenames } "
314314 end
315315
316- #: (Hash[String , Symbol] diff, tmp_dir: Pathname, command: Symbol) -> void
316+ #: (Hash[Pathname , Symbol] diff, tmp_dir: Pathname, command: Symbol) -> void
317317 def report_diff_and_exit_if_out_of_date ( diff , tmp_dir :, command :)
318318 if diff . empty?
319319 say ( "Nothing to do, all RBIs are up-to-date." )
@@ -351,20 +351,19 @@ def report_diff_and_exit_if_out_of_date(diff, tmp_dir:, command:)
351351 ERROR
352352 end
353353
354- #: (Hash[String , Symbol] diff, Pathname tmp_dir) -> String
354+ #: (Hash[Pathname , Symbol] diff, Pathname tmp_dir) -> String
355355 def build_diff_output ( diff , tmp_dir )
356356 out = String . new
357357 line_count = 0
358358
359359 diff . each do |file , status |
360- filename = file
361360 old_path = ( @outpath / file )
362361 new_path = ( tmp_dir / file )
363362
364363 chunk = case status
365- when :added then file_diff ( filename , File ::NULL , new_path )
366- when :removed then file_diff ( filename , old_path , File ::NULL )
367- when :changed then file_diff ( filename , old_path , new_path )
364+ when :added then file_diff ( file , File ::NULL , new_path )
365+ when :removed then file_diff ( file , old_path , File ::NULL )
366+ when :changed then file_diff ( file , old_path , new_path )
368367 else ""
369368 end
370369
0 commit comments