From 8320576ab3e7ea2a58497d7ed2ceb3775c5a1097 Mon Sep 17 00:00:00 2001 From: Jaiden Mispy Date: Wed, 13 Jan 2016 00:34:38 -0800 Subject: [PATCH] Don't run more passes if no variant. Fixes #79 --- lib/twitter_ebooks/suffix.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/twitter_ebooks/suffix.rb b/lib/twitter_ebooks/suffix.rb index aa2b791..d44d88d 100644 --- a/lib/twitter_ebooks/suffix.rb +++ b/lib/twitter_ebooks/suffix.rb @@ -89,7 +89,11 @@ module Ebooks break if variant end - tikis = variant if variant + # If we failed to produce a variation from any alternative, there + # is no use running additional passes-- they'll have the same result. + break if variant.nil? + + tikis = variant end tikis