lib/rouge/lexer.rb in rouge-1.10.1 vs lib/rouge/lexer.rb in rouge-1.11.0

- old
+ new

@@ -122,12 +122,14 @@ # If we're filtering against *all* lexers, we only use confident return # values from analyze_text. But if we've filtered down already, we can trust # the analysis more. source_threshold = lexers.size < total_size ? 0 : 0.5 return [best_by_source(lexers, source, source_threshold)].compact + elsif lexers.size < total_size + return lexers + else + return [] end - - [] end class AmbiguousGuess < StandardError attr_reader :alternatives def initialize(alternatives); @alternatives = alternatives; end