lib/tapioca/gemfile.rb in tapioca-0.12.0 vs lib/tapioca/gemfile.rb in tapioca-0.13.0

- old
+ new

@@ -176,10 +176,21 @@ end end sig { void } def parse_yard_docs - files.each { |path| YARD.parse(path.to_s, [], Logger::Severity::FATAL) } + files.each do |path| + YARD.parse(path.to_s, [], Logger::Severity::FATAL) + rescue RangeError + # In some circumstances, YARD will raise an error when parsing a file + # that is actually valid Ruby. We don't want tapioca to halt in these + # cases, so we'll rescue the error, pretend like there was no + # documentation, and move on. + # + # This can be removed when https://github.com/lsegal/yard/issues/1536 + # is resolved and released. + [] + end end sig { returns(T::Array[String]) } def exported_rbi_files @exported_rbi_files ||= Dir.glob("#{full_gem_path}/rbi/**/*.rbi").sort