diff --git a/src/rules.cr b/src/rules.cr index 1f4a7eb..a7dc872 100644 --- a/src/rules.cr +++ b/src/rules.cr @@ -19,7 +19,7 @@ module Tartrazine match = pattern.match(text, pos) # We don't match if the match doesn't move the cursor # because that causes infinite loops - return false, pos, [] of Token if match.nil? || match.end == 0 + return false, pos, [] of Token if match.nil? || match.size == 0 # Log.trace { "#{match}, #{pattern.inspect}, #{text}, #{pos}" } tokens = [] of Token # Emit the tokens