Skip to content

Commit eb3a5ba

Browse files
committed
Make retry condition more defensive not to loop infinitely
1 parent 3351d5b commit eb3a5ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rdoc/generator/darkfish.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ def excerpt(comment)
722722
first_paragraph_match = text.match(pattern)
723723
rescue Encoding::CompatibilityError
724724
# The doc is non-ASCII text and encoded in other than Unicode base encodings.
725-
raise unless pattern.eaual?(ParagraphExcerptRegexpUnicode)
725+
raise if pattern == ParagraphExcerptRegexpOther
726726
pattern = ParagraphExcerptRegexpOther
727727
retry
728728
end

0 commit comments

Comments
 (0)