Revert "Instrument usage of bug with iteration of String with offset or 0 limit (#1667)"

This reverts commit c743936a78.
This commit is contained in:
Dylan Thacker-Smith
2023-01-17 15:28:39 -05:00
committed by GitHub
parent e804f36681
commit 65899ee261
2 changed files with 1 additions and 35 deletions
+1 -5
View File
@@ -16,11 +16,7 @@ module Liquid
# Maintains Ruby 1.8.7 String#each behaviour on 1.9
if collection.is_a?(String)
return [] if collection.empty?
if from > 0 || to == 0
Usage.increment("string_slice_bug")
end
return [collection]
return collection.empty? ? [] : [collection]
end
return [] unless collection.respond_to?(:each)