Skip to content

Commit ae87f80

Browse files
committed
Remove unnecessary branch
text should always be a string here. It is created via input[pos, len], and pos should never be after the end of the string. The code above in the unless ch == '=' block assumes it is a string, and the one place it is reassigned assigns it to the empty string.
1 parent 78a1306 commit ae87f80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/erubi.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def initialize(input, properties={})
133133
end
134134

135135
is_bol = rspace
136-
add_text(text) if text
136+
add_text(text)
137137
case ch
138138
when '='
139139
rspace = nil if tailch && !tailch.empty?

0 commit comments

Comments
 (0)